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.
BrickBreaker_Engine/BrickBreakerEngine.h
- Committer:
- JamesCummins
- Date:
- 2019-05-04
- Revision:
- 35:138ad0faa42b
- Parent:
- 34:7e03391cb8a6
- Child:
- 37:de1f584bce71
File content as of revision 35:138ad0faa42b:
#ifndef BRICKBREAKERENGINE_H #define BRICKBREAKERENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "FXOS8700CQ.h" #include "Ball.h" #include "Pause.h" #include "SDFileSystem.h" #include <cmath> class BrickBreakerEngine { public: //constructor method BrickBreakerEngine(); //destructor method ~BrickBreakerEngine(); //functionality methods void init(int radius, Ball &ball); //done void brickbreaker_draw(N5110 &lcd, Ball &ball); //done void set_score(int score); void check_square_collision(AnalogIn &randnoise, Ball &ball); void time_warning(Gamepad &gamepad, int frame, int fps); void write_high_scores(); void end(Gamepad &gamepad, N5110 &lcd); private: //private functions void generate_rand_square(AnalogIn &randnoise); void print_score(N5110 &lcd); void read_high_scores(); void check_high_score(); //private variables int _index_array[6]; float _array_of_values[6]; int _ball_radius; Vector2D _square_coord; int _score; }; #endif