![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All there but errors need fixing
Tetromino/Tetromino.h@4:7ddd287a5d28, 2020-05-31 (annotated)
- Committer:
- el18rs
- Date:
- Sun May 31 17:01:53 2020 +0000
- Revision:
- 4:7ddd287a5d28
- Parent:
- 3:522c6f850e91
Includes most parts but still has errors that need fixing
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el18rs | 3:522c6f850e91 | 1 | #ifndef TETROMINO_H |
el18rs | 3:522c6f850e91 | 2 | #define TETROMINO_H |
el18rs | 3:522c6f850e91 | 3 | |
el18rs | 3:522c6f850e91 | 4 | #include "mbed.h" |
el18rs | 3:522c6f850e91 | 5 | #include "N5110.h" |
el18rs | 3:522c6f850e91 | 6 | #include "Gamepad.h" |
el18rs | 3:522c6f850e91 | 7 | |
el18rs | 3:522c6f850e91 | 8 | class Tetromino |
el18rs | 3:522c6f850e91 | 9 | { |
el18rs | 3:522c6f850e91 | 10 | public: |
el18rs | 3:522c6f850e91 | 11 | |
el18rs | 3:522c6f850e91 | 12 | Tetromino(); |
el18rs | 3:522c6f850e91 | 13 | ~Tetromino(); |
el18rs | 4:7ddd287a5d28 | 14 | void init(int number, int x, int y, int speed); |
el18rs | 3:522c6f850e91 | 15 | void draw(N5110 &lcd, int x); |
el18rs | 3:522c6f850e91 | 16 | void update(Direction d, float mag); |
el18rs | 3:522c6f850e91 | 17 | Vector2D get_pos(); |
el18rs | 4:7ddd287a5d28 | 18 | Vector2D get_velocity(); |
el18rs | 3:522c6f850e91 | 19 | |
el18rs | 3:522c6f850e91 | 20 | private: |
el18rs | 3:522c6f850e91 | 21 | |
el18rs | 4:7ddd287a5d28 | 22 | Vector2D _velocity; |
el18rs | 4:7ddd287a5d28 | 23 | |
el18rs | 3:522c6f850e91 | 24 | int _x; |
el18rs | 3:522c6f850e91 | 25 | int _y; |
el18rs | 3:522c6f850e91 | 26 | int _speed; |
el18rs | 4:7ddd287a5d28 | 27 | int _number; |
el18rs | 4:7ddd287a5d28 | 28 | |
el18rs | 4:7ddd287a5d28 | 29 | int blockArray[5]; |
el18rs | 4:7ddd287a5d28 | 30 | int blocknumber; |
el18rs | 3:522c6f850e91 | 31 | |
el18rs | 3:522c6f850e91 | 32 | }; |
el18rs | 3:522c6f850e91 | 33 | #endif |