![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Owen Cavender 201159294
GameEngine.h@2:44e4a6ecdbef, 2020-05-26 (annotated)
- Committer:
- el17oc
- Date:
- Tue May 26 18:35:44 2020 +0000
- Revision:
- 2:44e4a6ecdbef
- Parent:
- 1:897160a1a3ae
ELEC2645
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 | 1:897160a1a3ae | 7 | |
el17oc | 1:897160a1a3ae | 8 | |
el17oc | 1:897160a1a3ae | 9 | |
el17oc | 1:897160a1a3ae | 10 | |
el17oc | 1:897160a1a3ae | 11 | class GameEngine |
el17oc | 1:897160a1a3ae | 12 | { |
el17oc | 1:897160a1a3ae | 13 | |
el17oc | 1:897160a1a3ae | 14 | |
el17oc | 1:897160a1a3ae | 15 | public: |
el17oc | 1:897160a1a3ae | 16 | GameEngine(); |
el17oc | 1:897160a1a3ae | 17 | ~GameEngine(); |
el17oc | 1:897160a1a3ae | 18 | |
el17oc | 1:897160a1a3ae | 19 | |
el17oc | 2:44e4a6ecdbef | 20 | void init(int shx, int shy, int apx, int apy, int Oshx, int Oshy); |
el17oc | 1:897160a1a3ae | 21 | void set_Snakehead(Vector2D Snakehead); |
el17oc | 1:897160a1a3ae | 22 | void set_Applepos(N5110 &lcd); |
el17oc | 1:897160a1a3ae | 23 | Vector2D get_Snakehead(); |
el17oc | 1:897160a1a3ae | 24 | Vector2D get_Applepos(); |
el17oc | 2:44e4a6ecdbef | 25 | Vector2D get_oldSnakehead(); |
el17oc | 1:897160a1a3ae | 26 | //void clear_Applepos(); |
el17oc | 1:897160a1a3ae | 27 | |
el17oc | 1:897160a1a3ae | 28 | |
el17oc | 1:897160a1a3ae | 29 | private: |
el17oc | 1:897160a1a3ae | 30 | int _shx; |
el17oc | 1:897160a1a3ae | 31 | int _shy; |
el17oc | 1:897160a1a3ae | 32 | int _apx; |
el17oc | 1:897160a1a3ae | 33 | int _apy; |
el17oc | 2:44e4a6ecdbef | 34 | int _Oshx; |
el17oc | 2:44e4a6ecdbef | 35 | int _Oshy; |
el17oc | 1:897160a1a3ae | 36 | |
el17oc | 1:897160a1a3ae | 37 | }; |
el17oc | 1:897160a1a3ae | 38 | |
el17oc | 1:897160a1a3ae | 39 | |
el17oc | 1:897160a1a3ae | 40 | #endif |