Su 200943147
Dependencies: Gamepad N5110 mbed
Shape/Shape.h@9:6ee4c806f3e9, 2017-05-04 (annotated)
- Committer:
- GS00
- Date:
- Thu May 04 14:20:35 2017 +0000
- Revision:
- 9:6ee4c806f3e9
- Parent:
- 7:31dd8865cc44
Final and Upload version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
GS00 | 3:9dd35424cdfe | 1 | #ifndef Shape_H |
GS00 | 3:9dd35424cdfe | 2 | #define Shape_H |
GS00 | 3:9dd35424cdfe | 3 | |
GS00 | 0:444b4d0a113d | 4 | #include "mbed.h" |
GS00 | 6:e919a1fd1eed | 5 | #include "Gamepad.h" |
GS00 | 0:444b4d0a113d | 6 | |
GS00 | 9:6ee4c806f3e9 | 7 | /** |
GS00 | 9:6ee4c806f3e9 | 8 | @Class of Shape for Tetris |
GS00 | 9:6ee4c806f3e9 | 9 | @Author Guanxiong Su |
GS00 | 9:6ee4c806f3e9 | 10 | @Date May 2017 |
GS00 | 9:6ee4c806f3e9 | 11 | */ |
GS00 | 0:444b4d0a113d | 12 | class Shape |
GS00 | 0:444b4d0a113d | 13 | { |
GS00 | 3:9dd35424cdfe | 14 | public: |
GS00 | 0:444b4d0a113d | 15 | Shape(); |
GS00 | 3:9dd35424cdfe | 16 | void Init(); |
GS00 | 3:9dd35424cdfe | 17 | void L_Shape(); |
GS00 | 3:9dd35424cdfe | 18 | void O_Shape(); |
GS00 | 3:9dd35424cdfe | 19 | void S_Shape(); |
GS00 | 3:9dd35424cdfe | 20 | void Z_Shape(); |
GS00 | 3:9dd35424cdfe | 21 | void I_Shape(); |
GS00 | 3:9dd35424cdfe | 22 | void J_Shape(); |
GS00 | 3:9dd35424cdfe | 23 | void T_Shape(); |
GS00 | 6:e919a1fd1eed | 24 | void Update(Gamepad &pad); |
GS00 | 3:9dd35424cdfe | 25 | int ShapeArray[84][48]; |
GS00 | 3:9dd35424cdfe | 26 | int ShapeInit[84][48]; |
GS00 | 6:e919a1fd1eed | 27 | void ShapePicker(); |
GS00 | 6:e919a1fd1eed | 28 | void Rotate(Gamepad &pad); |
GS00 | 3:9dd35424cdfe | 29 | |
GS00 | 0:444b4d0a113d | 30 | int x; |
GS00 | 3:9dd35424cdfe | 31 | int y; |
GS00 | 3:9dd35424cdfe | 32 | int n; |
GS00 | 6:e919a1fd1eed | 33 | int t; |
GS00 | 6:e919a1fd1eed | 34 | int New; |
GS00 | 3:9dd35424cdfe | 35 | |
GS00 | 3:9dd35424cdfe | 36 | private: |
GS00 | 3:9dd35424cdfe | 37 | int l; |
GS00 | 3:9dd35424cdfe | 38 | int k; |
GS00 | 3:9dd35424cdfe | 39 | int RandomNumber; |
GS00 | 6:e919a1fd1eed | 40 | int ArrayRotate[84][48]; |
GS00 | 3:9dd35424cdfe | 41 | |
GS00 | 3:9dd35424cdfe | 42 | }; |
GS00 | 3:9dd35424cdfe | 43 | #endif |