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@6:a54df561f442, 2019-03-14 (annotated)
- Committer:
- el17ajf
- Date:
- Thu Mar 14 12:08:10 2019 +0000
- Revision:
- 6:a54df561f442
- Parent:
- 5:3efbdcb3efaf
- Child:
- 7:2e37bad816cb
Changed tetromino constructors
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17ajf | 4:aa433f9865a6 | 1 | #include "Block.h" |
el17ajf | 4:aa433f9865a6 | 2 | |
el17ajf | 4:aa433f9865a6 | 3 | class Tetromino { |
el17ajf | 4:aa433f9865a6 | 4 | public: |
el17ajf | 4:aa433f9865a6 | 5 | enum Type { |
el17ajf | 4:aa433f9865a6 | 6 | I, O, T, J, L, S, Z |
el17ajf | 4:aa433f9865a6 | 7 | }; |
el17ajf | 6:a54df561f442 | 8 | static Tetromino getTetrominoOfType(Type type); |
el17ajf | 4:aa433f9865a6 | 9 | Tetromino movedLeft(); |
el17ajf | 4:aa433f9865a6 | 10 | Tetromino movedRight(); |
el17ajf | 6:a54df561f442 | 11 | Tetromino movedDown(); |
el17ajf | 6:a54df561f442 | 12 | void draw(); |
el17ajf | 6:a54df561f442 | 13 | static Type getRandomTetrominoType(); |
el17ajf | 6:a54df561f442 | 14 | private: |
el17ajf | 6:a54df561f442 | 15 | Tetromino translated(int dx, int dy); |
el17ajf | 6:a54df561f442 | 16 | Tetromino(Block a, Block b, Block c, Block d); |
el17ajf | 6:a54df561f442 | 17 | static Tetromino getTetrominoFromString(const char * str); |
el17ajf | 6:a54df561f442 | 18 | ~Tetromino(); |
el17ajf | 4:aa433f9865a6 | 19 | }; |