test avoid bulled game

Dependencies:   C12832_lcd LCD_fonts mbed mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
th_mbed
Date:
Mon Dec 05 12:11:29 2016 +0000
Parent:
12:c74115744b24
Child:
14:5da230069776
Child:
15:400760117d9d
Child:
18:0f6f2aa2339d
Commit message:
modify compile error in Stage

Changed in this revision

Person.cpp Show annotated file Show diff for this revision Revisions of this file
Stage.cpp Show annotated file Show diff for this revision Revisions of this file
models.h Show annotated file Show diff for this revision Revisions of this file
--- a/Person.cpp	Mon Dec 05 12:01:14 2016 +0000
+++ b/Person.cpp	Mon Dec 05 12:11:29 2016 +0000
@@ -38,5 +38,5 @@
 }
 
 bool Person::isGround(int height){
-    return height == (p.y + HERSON_SIZE - 1);
+    return height == (p.y + PERSON_SIZE - 1);
 }
\ No newline at end of file
--- a/Stage.cpp	Mon Dec 05 12:01:14 2016 +0000
+++ b/Stage.cpp	Mon Dec 05 12:11:29 2016 +0000
@@ -5,12 +5,12 @@
     this->v = v;
     length = STEP_NUM;
     for(int i = 0; i < STEP_NUM; i++){
-        stage[i].x = LCD_X - i * STEP_SIZE - 1;
-        stage[i].y = 1;    
+        stage[i].x = LCD_X - i * ONE_STEP_SIZE - 1;
+        stage[i].y = LCD_Y - 2;    
     }    
 }
 
-Stage::getStage(point* stage){
+point* Stage::getStage(point* stage){
     stage = this->stage;
     return stage;
 }
\ No newline at end of file
--- a/models.h	Mon Dec 05 12:01:14 2016 +0000
+++ b/models.h	Mon Dec 05 12:11:29 2016 +0000
@@ -8,7 +8,8 @@
 
 //Stage params
 #define ONE_STEP_SIZE 15
-#define STEP_NUM LCD_X/ONE_STSGE_SIZE+1
+#define STEP_NUM LCD_X/ONE_STEP_SIZE+1
+//#define STEP_NUM 10
 #define ALL_LENGTH 1000
 #define STAGE_V 1
 
@@ -55,7 +56,7 @@
 private:
     int v;
     int length;
-    point[STEP_NUM] stage;
+    point stage[STEP_NUM];
 public:
     Stage(int v);
     point* getStage(point* stage);