Craig Evans
/
ELEC2645_Pong2021
Pong game for ELEC1620 board.
Diff: lib/Paddle.h
- Revision:
- 1:d63a63f0d397
- Child:
- 2:482d74ef09c8
diff -r be41a15e7a86 -r d63a63f0d397 lib/Paddle.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Paddle.h Fri Mar 05 16:58:05 2021 +0000 @@ -0,0 +1,30 @@ +#ifndef PADDLE_H +#define PADDLE_H + +#include "mbed.h" +#include "N5110.h" +#include "Utils.h" + +class Paddle +{ +public: + + Paddle(); + void init(int x,int height,int width); + void draw(N5110 &lcd); + void update(UserInput input); + void add_score(); + int get_score(); + Position2D get_pos(); + +private: + + int _height; + int _width; + int _x; + int _y; + int _speed; + int _score; + +}; +#endif \ No newline at end of file