Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Gameengine/Gameengine.h@28:a38070a1cdcf, 2019-04-09 (annotated)
- Committer:
- el17arm
- Date:
- Tue Apr 09 21:03:49 2019 +0000
- Revision:
- 28:a38070a1cdcf
reorganised differently (unfinished) returning to previous version but may return to this one still
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17arm | 28:a38070a1cdcf | 1 | #ifndef GAMEENGINE_H |
| el17arm | 28:a38070a1cdcf | 2 | #define GAMEENGINE_H |
| el17arm | 28:a38070a1cdcf | 3 | |
| el17arm | 28:a38070a1cdcf | 4 | #include "mbed.h" |
| el17arm | 28:a38070a1cdcf | 5 | #include "N5110.h" |
| el17arm | 28:a38070a1cdcf | 6 | #include "Gamepad.h" |
| el17arm | 28:a38070a1cdcf | 7 | #include "Miner.h" |
| el17arm | 28:a38070a1cdcf | 8 | #include "Level1.h" |
| el17arm | 28:a38070a1cdcf | 9 | #include "Levelengine.h" |
| el17arm | 28:a38070a1cdcf | 10 | #include "Levelobjects.h" |
| el17arm | 28:a38070a1cdcf | 11 | |
| el17arm | 28:a38070a1cdcf | 12 | class Gameengine |
| el17arm | 28:a38070a1cdcf | 13 | { |
| el17arm | 28:a38070a1cdcf | 14 | |
| el17arm | 28:a38070a1cdcf | 15 | public: |
| el17arm | 28:a38070a1cdcf | 16 | Gameengine(); |
| el17arm | 28:a38070a1cdcf | 17 | ~Gameengine(); |
| el17arm | 28:a38070a1cdcf | 18 | |
| el17arm | 28:a38070a1cdcf | 19 | void read_direction(Gamepad &pad); |
| el17arm | 28:a38070a1cdcf | 20 | void update(N5110 &lcd, Gamepad &pad); |
| el17arm | 28:a38070a1cdcf | 21 | void draw(Key _k, N5110 &lcd, Gamepad &pad); |
| el17arm | 28:a38070a1cdcf | 22 | void game_init(); |
| el17arm | 28:a38070a1cdcf | 23 | void lose_life(N5110 &lcd); |
| el17arm | 28:a38070a1cdcf | 24 | bool game_over(); |
| el17arm | 28:a38070a1cdcf | 25 | void next_level(N5110 &lcd); |
| el17arm | 28:a38070a1cdcf | 26 | |
| el17arm | 28:a38070a1cdcf | 27 | private: |
| el17arm | 28:a38070a1cdcf | 28 | |
| el17arm | 28:a38070a1cdcf | 29 | Miner _miner; |
| el17arm | 28:a38070a1cdcf | 30 | Level1 _l1; |
| el17arm | 28:a38070a1cdcf | 31 | Levelengine _level; |
| el17arm | 28:a38070a1cdcf | 32 | Levelobjects _obj; |
| el17arm | 28:a38070a1cdcf | 33 | Direction _d; |
| el17arm | 28:a38070a1cdcf | 34 | Timer t; |
| el17arm | 28:a38070a1cdcf | 35 | int _level_select; |
| el17arm | 28:a38070a1cdcf | 36 | int _lives; |
| el17arm | 28:a38070a1cdcf | 37 | }; |
| el17arm | 28:a38070a1cdcf | 38 | #endif |