Final Submission. I have read and agreed with Statement of Academic Integrity.
Dependencies: mbed Gamepad N5110 Joystick
Game_engine/Game_engine.h@2:0bd6711eae26, 2019-05-08 (annotated)
- Committer:
- el16dlc
- Date:
- Wed May 08 21:26:27 2019 +0000
- Revision:
- 2:0bd6711eae26
- Parent:
- 1:b9f3b7d869d8
- Child:
- 3:660de4311976
3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el16dlc | 1:b9f3b7d869d8 | 1 | #ifndef GAME_ENGINE_H |
el16dlc | 1:b9f3b7d869d8 | 2 | #define GAME_ENGINE_H |
el16dlc | 1:b9f3b7d869d8 | 3 | |
el16dlc | 1:b9f3b7d869d8 | 4 | #include "mbed.h" |
el16dlc | 1:b9f3b7d869d8 | 5 | #include "N5110.h" |
el16dlc | 1:b9f3b7d869d8 | 6 | #include "main.h" |
el16dlc | 1:b9f3b7d869d8 | 7 | #include "Gamepad.h" |
el16dlc | 1:b9f3b7d869d8 | 8 | #include "Game_engine.h" |
el16dlc | 2:0bd6711eae26 | 9 | #include "Snake.h" |
el16dlc | 2:0bd6711eae26 | 10 | |
el16dlc | 2:0bd6711eae26 | 11 | //Snake snake; |
el16dlc | 1:b9f3b7d869d8 | 12 | |
el16dlc | 1:b9f3b7d869d8 | 13 | class GameEngine { |
el16dlc | 1:b9f3b7d869d8 | 14 | |
el16dlc | 1:b9f3b7d869d8 | 15 | public: |
el16dlc | 1:b9f3b7d869d8 | 16 | GameEngine(); |
el16dlc | 1:b9f3b7d869d8 | 17 | ~GameEngine(); |
el16dlc | 1:b9f3b7d869d8 | 18 | |
el16dlc | 2:0bd6711eae26 | 19 | void init(); |
el16dlc | 1:b9f3b7d869d8 | 20 | void draw(N5110 &lcd); |
el16dlc | 2:0bd6711eae26 | 21 | void get_dir(Gamepad &gamepad); |
el16dlc | 2:0bd6711eae26 | 22 | void snake_move(); |
el16dlc | 2:0bd6711eae26 | 23 | |
el16dlc | 2:0bd6711eae26 | 24 | private: |
el16dlc | 2:0bd6711eae26 | 25 | int _direction; |
el16dlc | 1:b9f3b7d869d8 | 26 | }; |
el16dlc | 1:b9f3b7d869d8 | 27 | |
el16dlc | 1:b9f3b7d869d8 | 28 | #endif |