ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Revision:
13:59e17cab320a
Parent:
11:fba7d54fd36b
Child:
15:afeefa3ceb61
--- a/Game/Game.cpp	Sun Mar 17 12:14:56 2019 +0000
+++ b/Game/Game.cpp	Mon Mar 18 18:09:57 2019 +0000
@@ -1,5 +1,6 @@
 #include "Game.h"
 #include "Input.h"
+#include "mbed.h" // TODO
 
 Game::Game() {
     currentTetromino = Tetromino::getTetrominoOfType(
@@ -20,6 +21,8 @@
     if (Input::buttonHit(Input::RIGHT)) {
         if (grid.isSpaceForTetromino(currentTetromino.movedRight())) {
             currentTetromino = currentTetromino.movedRight();
+        } else {
+            printf("NO SPACE TO THE RIGHT");
         }
     }
     if (Input::buttonHit(Input::UP)) {
@@ -38,6 +41,7 @@
     } else {
         grid.placeTetromino(currentTetromino);
         currentTetromino = Tetromino::getTetrominoOfType(nextTetrominoType);
+        nextTetrominoType = Tetromino::getRandomTetrominoType();
     }
 }