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.
DodgeEngine/DodgeEngine.h
- Committer:
- ll16o2l
- Date:
- 2019-04-06
- Revision:
- 2:888634fff8ff
- Child:
- 3:aa82968b7a8e
File content as of revision 2:888634fff8ff:
#ifndef DODGENGINE_H
#define DODGEENGINE_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Objects.h"
#include "Player.h"
#include "Stopwatch.h"
class DodgeEngine
{
public:
DodgeEngine();
~DodgeEngine();
void init(int player_width,int player_height,int objetcs_size,int speed);
void read_input(Gamepad &pad);
void update(Gamepad &pad);
void draw(N5110 &lcd);
int get_lose();
private:
void check_wall_collision(Gamepad &pad);
void check_player_collisions(Gamepad &pad);
void print_scores(N5110 &lcd);
// Paddle _p1; ////CHANGE TO OBJETCS
// Paddle _p2;
Player _player;
Stopwatch _stopwatch;
int _player_width;
int _player_height;
int _objects_size;
int _speed;
int lose;
int player_score;
Objects _objects;
Direction _d;
float _mag;
};
#endif