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
- Committer:
- Noximilien
- Date:
- 2019-04-10
- Revision:
- 28:35af3843de8f
- Parent:
- 27:f05f4e738ba9
- Child:
- 29:579e00b7f118
File content as of revision 28:35af3843de8f:
#ifndef GAME_H #define GAME_H #include "geometry.h" extern int game_score; extern int score_count_for_difficulty; extern int player_lifes; extern bool red_led_state; extern int red_led_flashing; extern int high_score; class Game{ public: /** This is the main function of game.cpp, where the actual gameplay happens. * Here all other functions are activeated, and when the player dies, it * returns back to main menu "main.cpp". */ bool updateAndDraw(); /** This function resets all the values to their intial states when the game is * first began when the player dies and wants to restart the game. * It does not reset the values when the game is paused. */ void startNewGame(); private: bool checkForGameOver(); void collideEnemiesAndBlasts(); void collideEnemiesBlastsAndPlayer(); void collideEnemiesAndPlayer(); void starsSpawnDelay(); void increaseGameDifficultyAndEnemySpawnDelay(); void gameOver(); void drawGameOver(); }; #endif