Alexandra Posta / Mbed OS ELEC2645_Race_Collision

Dependencies:   ELEC2645_JoystickLCD_LPC1768_2021

Committer:
alex_20
Date:
Sat Apr 24 21:31:19 2021 +0000
Revision:
8:1fc5e14b0db6
Parent:
1:2ae7a8b01771
Child:
9:6f060f495536
Before game engine. ball done

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alex_20 8:1fc5e14b0db6 1 #ifndef GAMEENGINE_H
alex_20 8:1fc5e14b0db6 2 #define GAMEENGINE_H
alex_20 8:1fc5e14b0db6 3
alex_20 8:1fc5e14b0db6 4 #include "mbed.h"
alex_20 8:1fc5e14b0db6 5 #include "N5110.h"
alex_20 8:1fc5e14b0db6 6 #include "Ball.h"
alex_20 8:1fc5e14b0db6 7 #include "Utils.h"
alex_20 8:1fc5e14b0db6 8 #include "Road.h"
alex_20 8:1fc5e14b0db6 9 #include "Car.h"
alex_20 8:1fc5e14b0db6 10 #include "Vector.h"
alex_20 8:1fc5e14b0db6 11
alex_20 8:1fc5e14b0db6 12 class GameEngine {
alex_20 8:1fc5e14b0db6 13 public:
alex_20 8:1fc5e14b0db6 14 GameEngine(); // pass in the lcd object from the main file
alex_20 8:1fc5e14b0db6 15 void init(int paddle_position,int paddle_height,int paddle_width,int ball_size,int speed);
alex_20 8:1fc5e14b0db6 16 int update(UserInput input);
alex_20 8:1fc5e14b0db6 17 void sign(N5110 &lcd, Road &road);
alex_20 8:1fc5e14b0db6 18 void draw(N5110 &lcd);
alex_20 8:1fc5e14b0db6 19 private:
alex_20 8:1fc5e14b0db6 20 void check_collision();
alex_20 8:1fc5e14b0db6 21 void generate_ball();
alex_20 8:1fc5e14b0db6 22 void generate_road();
alex_20 8:1fc5e14b0db6 23 Ball _ball;
alex_20 8:1fc5e14b0db6 24 Road _road;
alex_20 8:1fc5e14b0db6 25 };
alex_20 8:1fc5e14b0db6 26
alex_20 8:1fc5e14b0db6 27 #endif