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.
Diff: BrickBreaker_Engine/BrickBreakerEngine.h
- Revision:
- 20:4a39a1a2be51
- Child:
- 23:61fa82f76808
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BrickBreaker_Engine/BrickBreakerEngine.h Wed Apr 17 14:34:08 2019 +0000 @@ -0,0 +1,38 @@ +#ifndef BRICKBREAKERENGINE_H +#define BRICKBREAKERENGINE_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" +#include "FXOS8700CQ.h" +#include "Ball.h" +#include "Pause.h" + +class BrickBreakerEngine { + +public: + //constructor method + BrickBreakerEngine(); + //destructor method + ~BrickBreakerEngine(); + //functionality methods + void init(int radius); //done + void brickbreaker_mode(FXOS8700CQ &accelerometer, Gamepad &gamepad, + N5110 &lcd, AnalogIn &randnoise, int fps); //done + +private: +//private functions + void brickbreaker_draw(N5110 &lcd); //done + void generate_rand_square(AnalogIn &randnoise); + void check_square_collision(AnalogIn &randnoise); + void print_score(N5110 &lcd); + +//private variables + Ball _ball; + int _ball_radius; + Vector2D _square_coord; + int _score; + Pause _pause; + +}; +#endif \ No newline at end of file