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
Grid/Grid.h
- Committer:
- el17ajf
- Date:
- 2019-03-15
- Revision:
- 9:3a7776a29a11
- Parent:
- 8:5066ce13a430
- Child:
- 11:fba7d54fd36b
File content as of revision 9:3a7776a29a11:
#include "Tetromino.h" class Grid { public: bool isSpaceForTetromino(Tetromino tetromino); void placeTetromino(Tetromino tetromino); void clear(); void draw(); Grid(); private: void checkForLines(); void moveDownIfNeeded(); void shiftDownFrom(int row); const static int GRID_HEIGHT = 20; const static int GRID_WIDTH = 10; bool grid[GRID_WIDTH][GRID_HEIGHT]; bool isSpaceForBlock(Block block); };