![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Owen Cavender 201159294
Dependencies: mbed
GameEngine.h@2:ffbfd3f53ee2, 2020-05-30 (annotated)
- Committer:
- el17oc
- Date:
- Sat May 30 06:12:09 2020 +0000
- Revision:
- 2:ffbfd3f53ee2
- Parent:
- 1:897160a1a3ae
Final Submission. I have read and agreed with Statement of Academic Integrity
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17oc | 1:897160a1a3ae | 1 | #ifndef GAMEENGINE_H |
el17oc | 1:897160a1a3ae | 2 | #define GAMEENGINE_H |
el17oc | 1:897160a1a3ae | 3 | |
el17oc | 1:897160a1a3ae | 4 | #include "mbed.h" |
el17oc | 1:897160a1a3ae | 5 | #include "N5110.h" |
el17oc | 1:897160a1a3ae | 6 | #include "Gamepad.h" |
el17oc | 2:ffbfd3f53ee2 | 7 | #include "snake.h" |
el17oc | 1:897160a1a3ae | 8 | |
el17oc | 1:897160a1a3ae | 9 | |
el17oc | 2:ffbfd3f53ee2 | 10 | /** GameEngine Class |
el17oc | 2:ffbfd3f53ee2 | 11 | * Owen Cavender, University of Leeds |
el17oc | 2:ffbfd3f53ee2 | 12 | */ |
el17oc | 1:897160a1a3ae | 13 | |
el17oc | 2:ffbfd3f53ee2 | 14 | class GameEngine { |
el17oc | 2:ffbfd3f53ee2 | 15 | |
el17oc | 1:897160a1a3ae | 16 | |
el17oc | 1:897160a1a3ae | 17 | public: |
el17oc | 2:ffbfd3f53ee2 | 18 | GameEngine(); |
el17oc | 2:ffbfd3f53ee2 | 19 | /**comstructor |
el17oc | 2:ffbfd3f53ee2 | 20 | */ |
el17oc | 2:ffbfd3f53ee2 | 21 | ~GameEngine(); |
el17oc | 2:ffbfd3f53ee2 | 22 | /**decomstructor |
el17oc | 2:ffbfd3f53ee2 | 23 | */ |
el17oc | 2:ffbfd3f53ee2 | 24 | |
el17oc | 2:ffbfd3f53ee2 | 25 | |
el17oc | 2:ffbfd3f53ee2 | 26 | void print_scores(N5110 &lcd, Snake &snake); |
el17oc | 2:ffbfd3f53ee2 | 27 | /**comstructor |
el17oc | 2:ffbfd3f53ee2 | 28 | * prints the score of the game while in game loop |
el17oc | 2:ffbfd3f53ee2 | 29 | */ |
el17oc | 2:ffbfd3f53ee2 | 30 | void get_LEDs(Gamepad &pad, Snake &snake); |
el17oc | 2:ffbfd3f53ee2 | 31 | /**turn on and off leds depending on snake head position |
el17oc | 2:ffbfd3f53ee2 | 32 | */ |
el17oc | 2:ffbfd3f53ee2 | 33 | void print_countdown(N5110 &lcd, Snake &snake); |
el17oc | 2:ffbfd3f53ee2 | 34 | /** prints countdown counter on each loop |
el17oc | 2:ffbfd3f53ee2 | 35 | */ |
el17oc | 1:897160a1a3ae | 36 | |
el17oc | 1:897160a1a3ae | 37 | |
el17oc | 1:897160a1a3ae | 38 | private: |
el17oc | 2:ffbfd3f53ee2 | 39 | |
el17oc | 2:ffbfd3f53ee2 | 40 | |
el17oc | 1:897160a1a3ae | 41 | |
el17oc | 1:897160a1a3ae | 42 | }; |
el17oc | 1:897160a1a3ae | 43 | |
el17oc | 1:897160a1a3ae | 44 | |
el17oc | 2:ffbfd3f53ee2 | 45 | #endif |