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
Tetromino/Tetromino.h
- Committer:
- el17ajf
- Date:
- 2019-03-15
- Revision:
- 8:5066ce13a430
- Parent:
- 7:2e37bad816cb
- Child:
- 15:afeefa3ceb61
File content as of revision 8:5066ce13a430:
#include "Block.h" class Tetromino { public: enum Type { I, O, T, J, L, S, Z }; static Tetromino getTetrominoOfType(Tetromino::Type type); Tetromino movedLeft(); Tetromino movedRight(); Tetromino movedDown(); Tetromino rotatedClockwise(); Tetromino rotatedAnticlockwise(); void draw(); static Type getRandomTetrominoType(); Tetromino(); // TODO is this needed ~Tetromino(); Block blocks[4]; private: Tetromino translated(int dx, int dy); static Tetromino getTetrominoFromString(const char * str); Tetromino(Block a, Block b, Block c, Block d); };