test avoid bulled game

Dependencies:   C12832_lcd LCD_fonts mbed mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
kaku_jyoko
Date:
Mon Dec 05 07:34:15 2016 +0000
Parent:
6:e63641e13374
Child:
8:2fd3eedcde64
Child:
10:7b2cf5e89e65
Commit message:
person jump height change

Changed in this revision

Person.cpp Show annotated file Show diff for this revision Revisions of this file
main.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	Fri Dec 02 13:33:02 2016 +0000
+++ b/Person.cpp	Mon Dec 05 07:34:15 2016 +0000
@@ -14,11 +14,11 @@
         return p;
     }else if(jump_time == MAX_JUMP_TIME){
         //down
-        p.y += 1;
+        p.y += 2;
     }else{
         //up
         jump_time++;
-        p.y--;
+        p.y -= 2;
     }
     return p;
 }
@@ -31,7 +31,7 @@
 
 point Person::jump(){
     if(jump_count < MAX_JUMP_COUNT){
-        p.y--;
+        p.y -= 2;
         jump_time = 1;
         jump_count++;
     }
--- a/main.cpp	Fri Dec 02 13:33:02 2016 +0000
+++ b/main.cpp	Mon Dec 05 07:34:15 2016 +0000
@@ -40,9 +40,9 @@
     while(true){
         update_mtx.lock();
         p = h.update();
+        if(p.y == 0){
+        }
         update_mtx.unlock();
-        
-        //printf("x:%d  y:%d\n", p.x,p.y);
         lcd.cls();
         lcd.print_bm(bitmPlayer,p.x,p.y);
         lcd.copy_to_lcd();
--- a/models.h	Fri Dec 02 13:33:02 2016 +0000
+++ b/models.h	Mon Dec 05 07:34:15 2016 +0000
@@ -4,7 +4,7 @@
 
 #define DEFAULT_X  2
 #define DEFAULT_Y  26  //31-6+1
-#define MAX_JUMP_TIME 9
+#define MAX_JUMP_TIME 7
 #define MAX_JUMP_COUNT 2
 
 class Person