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
Fork of el17dg by
game/game.h@25:749f1efc31fc, 2019-04-03 (annotated)
- Committer:
- Noximilien
- Date:
- Wed Apr 03 12:46:04 2019 +0000
- Revision:
- 25:749f1efc31fc
- Parent:
- 24:0570cb4b92d7
- Child:
- 26:676874c42883
I have made some addition to score calculation and changed the model of the player ship.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Noximilien | 3:10918b0f7a7d | 1 | #ifndef GAME_H |
Noximilien | 3:10918b0f7a7d | 2 | #define GAME_H |
Noximilien | 3:10918b0f7a7d | 3 | |
Noximilien | 21:0eb394495b8a | 4 | #include "geometry.h" |
Noximilien | 25:749f1efc31fc | 5 | extern int game_score; |
Noximilien | 25:749f1efc31fc | 6 | extern int game_score; |
Noximilien | 25:749f1efc31fc | 7 | extern int player_lifes; |
Noximilien | 25:749f1efc31fc | 8 | extern bool red_led_state; |
Noximilien | 25:749f1efc31fc | 9 | extern int red_led_flashing; |
Noximilien | 24:0570cb4b92d7 | 10 | |
Noximilien | 4:02c63aaa2df9 | 11 | class Game{ |
Noximilien | 4:02c63aaa2df9 | 12 | public: |
Noximilien | 4:02c63aaa2df9 | 13 | bool updateAndDraw(); |
Noximilien | 21:0eb394495b8a | 14 | void startNewGame(); |
Noximilien | 4:02c63aaa2df9 | 15 | private: |
Noximilien | 21:0eb394495b8a | 16 | void collideEnemiesAndBlasts(); |
Noximilien | 21:0eb394495b8a | 17 | void collideEnemiesBlastsAndPlayer(); |
Noximilien | 23:240bc00ef25b | 18 | void collideEnemiesAndPlayer(); |
Noximilien | 23:240bc00ef25b | 19 | void gameOver(); |
Noximilien | 3:10918b0f7a7d | 20 | }; |
Noximilien | 3:10918b0f7a7d | 21 | |
Noximilien | 3:10918b0f7a7d | 22 | |
Noximilien | 3:10918b0f7a7d | 23 | #endif |