Dependencies: mbed
Diff: Game/Game.h
- Revision:
- 4:08a0ff6668df
- Child:
- 6:09a555c0d997
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Game/Game.h Sat May 16 13:10:01 2020 +0000 @@ -0,0 +1,33 @@ +#ifndef GAME_H +#define GAME_H + +#include "mbed.h" +#include "Gamepad.h" +#include "N5110.h" +#include "Ball.h" +#include "Splash.h" + + +class Game { + public: + Game(); + ~Game(); + /** @brief initialise game*/ + void init(); + void displayLevel(int level, N5110 &lcd); + void readInput(Gamepad &pad, N5110 &lcd); + void updateScore(N5110 &lcd); + void updateLives(Gamepad &pad); + + private: + int _score; + int _lives; + int _level; + int _x_val; + int _y_val; + int _speed; + bool _is_goal; + }; +void display_background(N5110 &lcd); +int random_level_gen(); +#endif \ No newline at end of file