Craig Evans / Mbed 2 deprecated Pong2

Dependencies:   mbed

Committer:
eencae
Date:
Fri Jan 31 12:32:38 2020 +0000
Revision:
0:7423345f87c5
Pong ported to Gamepad2;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
eencae 0:7423345f87c5 1 #ifndef PADDLE_H
eencae 0:7423345f87c5 2 #define PADDLE_H
eencae 0:7423345f87c5 3
eencae 0:7423345f87c5 4 #include "mbed.h"
eencae 0:7423345f87c5 5 #include "N5110.h"
eencae 0:7423345f87c5 6 #include "Gamepad.h"
eencae 0:7423345f87c5 7
eencae 0:7423345f87c5 8 class Paddle
eencae 0:7423345f87c5 9 {
eencae 0:7423345f87c5 10 public:
eencae 0:7423345f87c5 11
eencae 0:7423345f87c5 12 Paddle();
eencae 0:7423345f87c5 13 ~Paddle();
eencae 0:7423345f87c5 14 void init(int x,int height,int width);
eencae 0:7423345f87c5 15 void draw(N5110 &lcd);
eencae 0:7423345f87c5 16 void update(Direction d,float mag);
eencae 0:7423345f87c5 17 void add_score();
eencae 0:7423345f87c5 18 int get_score();
eencae 0:7423345f87c5 19 Vector2D get_pos();
eencae 0:7423345f87c5 20
eencae 0:7423345f87c5 21 private:
eencae 0:7423345f87c5 22
eencae 0:7423345f87c5 23 int _height;
eencae 0:7423345f87c5 24 int _width;
eencae 0:7423345f87c5 25 int _x;
eencae 0:7423345f87c5 26 int _y;
eencae 0:7423345f87c5 27 int _speed;
eencae 0:7423345f87c5 28 int _score;
eencae 0:7423345f87c5 29
eencae 0:7423345f87c5 30 };
eencae 0:7423345f87c5 31 #endif