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:
17:70d45e9e44a8
Parent:
16:fca1bbb06c44
Child:
18:a089d9d184b1
diff -r fca1bbb06c44 -r 70d45e9e44a8 TetrisGame/TetrisGame.cpp
--- a/TetrisGame/TetrisGame.cpp	Tue Jun 02 21:22:20 2020 +0000
+++ b/TetrisGame/TetrisGame.cpp	Tue Jun 02 22:02:25 2020 +0000
@@ -64,7 +64,7 @@
 {
     Vector2D tetromino_pos = _tetromino.get_pos();
     Vector2D tetromino_velocity = _tetromino.get_velocity();
-    floor_hit_flag = 0;
+//    floor_hit_flag = 0;
 
     // check if hit floor
     if (tetromino_pos.y + 4 >= (HEIGHT-1) ) {
@@ -109,10 +109,10 @@
     Vector2D tetromino_velocity = _tetromino.get_velocity();
 
     if (
-        (lcd.getPixel(tetromino_pos.x, tetromino_pos.y + 5) == 1) || // not sure if it should be 4 or 5 ???
-        (lcd.getPixel(tetromino_pos.x + 1, tetromino_pos.y + 5) == 1) ||
-        (lcd.getPixel(tetromino_pos.x + 2, tetromino_pos.y + 5) == 1) ||
-        (lcd.getPixel(tetromino_pos.x + 3, tetromino_pos.y + 5) == 1)
+        (lcd.getPixel(tetromino_pos.x, tetromino_pos.y + 4) == 1) || // not sure if it should be 4 or 5 ???
+        (lcd.getPixel(tetromino_pos.x + 1, tetromino_pos.y + 4) == 1) ||
+        (lcd.getPixel(tetromino_pos.x + 2, tetromino_pos.y + 4) == 1) ||
+        (lcd.getPixel(tetromino_pos.x + 3, tetromino_pos.y + 4) == 1)
     ) {
         tetromino_velocity.x = 0;