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-04-24
- Revision:
- 7:06c86ec1f19d
- Parent:
- 6:7b733b2a6cf6
- Child:
- 8:13cef7cb872e
File content as of revision 7:06c86ec1f19d:
#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, N5110 &lcd);
void print_scores(N5110 &lcd);
void print_scores1(N5110 &lcd);
private:
Rocket _rocket;
Asteroid _asteroid;
Direction _d;
float _mag;
void check_goal(Gamepad &pad);
int score;
};
#endif