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: ELEC2645_JoystickLCD_LPC1768_2021
lib/GameEngine.h
- Committer:
- alex_20
- Date:
- 2021-04-24
- Revision:
- 8:1fc5e14b0db6
- Parent:
- 1:2ae7a8b01771
- Child:
- 9:6f060f495536
File content as of revision 8:1fc5e14b0db6:
#ifndef GAMEENGINE_H
#define GAMEENGINE_H
#include "mbed.h"
#include "N5110.h"
#include "Ball.h"
#include "Utils.h"
#include "Road.h"
#include "Car.h"
#include "Vector.h"
class GameEngine {
public:
GameEngine(); // pass in the lcd object from the main file
void init(int paddle_position,int paddle_height,int paddle_width,int ball_size,int speed);
int update(UserInput input);
void sign(N5110 &lcd, Road &road);
void draw(N5110 &lcd);
private:
void check_collision();
void generate_ball();
void generate_road();
Ball _ball;
Road _road;
};
#endif