![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Owen Cavender 201159294
GameEngine.h@16:9500059ad5d8, 2020-05-30 (annotated)
- Committer:
- el17oc
- Date:
- Sat May 30 05:43:50 2020 +0000
- Revision:
- 16:9500059ad5d8
- Parent:
- 12:60c856354406
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 | 8:997f90c88246 | 1 | #ifndef GAMEENGINE_H |
el17oc | 8:997f90c88246 | 2 | #define GAMEENGINE_H |
el17oc | 8:997f90c88246 | 3 | |
el17oc | 8:997f90c88246 | 4 | #include "mbed.h" |
el17oc | 8:997f90c88246 | 5 | #include "N5110.h" |
el17oc | 8:997f90c88246 | 6 | #include "Gamepad.h" |
el17oc | 8:997f90c88246 | 7 | #include "snake.h" |
el17oc | 8:997f90c88246 | 8 | |
el17oc | 8:997f90c88246 | 9 | |
el17oc | 16:9500059ad5d8 | 10 | /** GameEngine Class |
el17oc | 16:9500059ad5d8 | 11 | * Owen Cavender, University of Leeds |
el17oc | 16:9500059ad5d8 | 12 | */ |
el17oc | 8:997f90c88246 | 13 | |
el17oc | 16:9500059ad5d8 | 14 | class GameEngine { |
el17oc | 16:9500059ad5d8 | 15 | |
el17oc | 8:997f90c88246 | 16 | |
el17oc | 8:997f90c88246 | 17 | public: |
el17oc | 16:9500059ad5d8 | 18 | GameEngine(); |
el17oc | 16:9500059ad5d8 | 19 | /**comstructor |
el17oc | 16:9500059ad5d8 | 20 | */ |
el17oc | 16:9500059ad5d8 | 21 | ~GameEngine(); |
el17oc | 16:9500059ad5d8 | 22 | /**decomstructor |
el17oc | 16:9500059ad5d8 | 23 | */ |
el17oc | 8:997f90c88246 | 24 | |
el17oc | 8:997f90c88246 | 25 | |
el17oc | 9:a69a6a06dddf | 26 | void print_scores(N5110 &lcd, Snake &snake); |
el17oc | 16:9500059ad5d8 | 27 | /**comstructor |
el17oc | 16:9500059ad5d8 | 28 | * prints the score of the game while in game loop |
el17oc | 16:9500059ad5d8 | 29 | */ |
el17oc | 9:a69a6a06dddf | 30 | void get_LEDs(Gamepad &pad, Snake &snake); |
el17oc | 16:9500059ad5d8 | 31 | /**turn on and off leds depending on snake head position |
el17oc | 16:9500059ad5d8 | 32 | */ |
el17oc | 12:60c856354406 | 33 | void print_countdown(N5110 &lcd, Snake &snake); |
el17oc | 16:9500059ad5d8 | 34 | /** prints countdown counter on each loop |
el17oc | 16:9500059ad5d8 | 35 | */ |
el17oc | 10:ee781d18e0f6 | 36 | |
el17oc | 8:997f90c88246 | 37 | |
el17oc | 8:997f90c88246 | 38 | private: |
el17oc | 8:997f90c88246 | 39 | |
el17oc | 12:60c856354406 | 40 | |
el17oc | 12:60c856354406 | 41 | |
el17oc | 8:997f90c88246 | 42 | }; |
el17oc | 8:997f90c88246 | 43 | |
el17oc | 8:997f90c88246 | 44 | |
el17oc | 8:997f90c88246 | 45 | #endif |
el17oc | 8:997f90c88246 | 46 | |
el17oc | 8:997f90c88246 | 47 | |
el17oc | 8:997f90c88246 | 48 | |
el17oc | 8:997f90c88246 | 49 | |
el17oc | 8:997f90c88246 | 50 | |
el17oc | 8:997f90c88246 | 51 |