Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of el17ajf by
Diff: Game/Game.cpp
- 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(); } }