All there but errors need fixing

Dependencies:   mbed

Overview:

Rookie Tetris is a jigsaw style game based on the classic Tetris.

A block will appear at the top of the screen, you must move it (your options for movement are left, right and down - you cannot move up the board). The block will stop when it if placed either on the floor of the board or on-top of another block.

Your goal is to fill a complete row of the board with the blocks; when you do so the row will delete and the pattern above it will drop down. The game is over when your pattern is tall enough to reach to the top of the board!

Controls:

Use the joystick to move your block! Your block cannot move out of the parameters of the board.

Pot 2 controls the contrast of the screen.

Revision:
18:a089d9d184b1
Parent:
17:70d45e9e44a8
Child:
19:2ad31dbd5d11
diff -r 70d45e9e44a8 -r a089d9d184b1 TetrisGame/TetrisGame.cpp
--- a/TetrisGame/TetrisGame.cpp	Tue Jun 02 22:02:25 2020 +0000
+++ b/TetrisGame/TetrisGame.cpp	Wed Jun 03 10:32:48 2020 +0000
@@ -15,8 +15,6 @@
 void TetrisGame::init(int speed)
 {
     // initialise game parameters
-//    _tetromino_height = tetromino_height;
-//    _tetromino_width = tetromino_width;
     _px = 40;
     _py = 4;
     _speed = speed;
@@ -74,7 +72,7 @@
 
         pad.tone(750.0,0.1);
 
-//        cancel_line(lcd); // check if line full and cancel + drop down if it is
+        cancel_line(lcd); // check if line full and cancel + drop down if it is
 
         lcd.drawRect(tetromino_pos.x, tetromino_pos.y, 4, 4, FILL_BLACK);
 
@@ -90,6 +88,8 @@
     }
     // check if hit roof
     else if (tetromino_pos.y <= 1) {
+        
+        floor_hit_flag = 0;
 
         printf("roof hit!\n");
 
@@ -129,7 +129,7 @@
         floor_hit_flag = 1;
 
         printf("blocks stacked!\n");
-    }
+    } 
     printf("tetromino collision\n");
 }