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
- Committer:
- RehamFaqehi
- Date:
- 2018-05-04
- Revision:
- 12:4d7f1349d796
- Parent:
- 11:cb48d596aa3e
- Child:
- 14:cf4a32245152
File content as of revision 12:4d7f1349d796:
#ifndef GameEngine_H #define GameEngine_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Rocket.h" #include "Asteroid.h" class GameEngine { public: GameEngine(); ~GameEngine(); void init(); void read_input(Gamepad &g_pad); void draw(N5110 &lcd); void update(Gamepad &pad); void draw_hearts(N5110 &lcd); int check_gameOver(); void print_time(N5110 &lcd); void time_increment(); void time_stop(); void print_travel_time(N5110 &lcd); private: void check_collision1(Gamepad &pad); void check_collision2(Gamepad &pad); void check_collision3(Gamepad &pad); Rocket _rocket; Asteroid _asteroid1; Asteroid _asteroid2; Asteroid _asteroid3; Direction _d; float _mag; int gameOver; Timer time; int _time; }; #endif