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
engine/engine.h
- Committer:
- RickYu
- Date:
- 2018-04-30
- Revision:
- 27:eab2cf10554e
- Parent:
- 22:c1e1283c6356
- Child:
- 30:057301068dac
File content as of revision 27:eab2cf10554e:
#ifndef ENGINE_H
#define ENGINE_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "rect.h"
#include "boom.h"
#include "bigboom.h"
#include "money.h"
#include "help.h"
class engine
{
public:
engine();
~engine();
void read_input(Gamepad &pad);
void update(Gamepad &pad,N5110 &lcd);
void draw(N5110 &lcd);
void start(Gamepad &pad,N5110 &lcd);
private:
void check_boom_collision(Gamepad &pad,N5110 &lcd);
void check_money_collision(Gamepad &pad,N5110 &lcd);
void check_boom_right_collision(Gamepad &pad,N5110 &lcd);
void check_boom_left_collision(Gamepad &pad,N5110 &lcd);
void check_bigboom_collision(Gamepad &pad,N5110 &lcd);
void check_bigboom_pos(Gamepad &pad);
void check_money_pos(Gamepad &pad);
void check_rect_pos(Gamepad &pad);
void check_boom_pos(Gamepad &pad);
void print_scores(N5110 &lcd);
rect _rect;
int _speed;
boom _boom;
money _money;
bigboom _bigboom;
help _help;
Direction _d;
float _mag;
};
#endif