Pong game for ELEC1620 board.

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Paddle.h Source File

Paddle.h

00001 #ifndef PADDLE_H
00002 #define PADDLE_H
00003 
00004 #include "mbed.h"
00005 #include "N5110.h"
00006 #include "Utils.h"
00007 
00008 class Paddle
00009 {
00010 public:
00011 
00012     Paddle();
00013     void init(int x,int height,int width);
00014     void draw(N5110 &lcd);
00015     void update(UserInput input);
00016     void add_score();
00017     int get_score();
00018     Position2D get_pos();
00019     int get_height();
00020     int get_width();
00021 
00022 private:
00023 
00024     int _height;
00025     int _width;
00026     int _x;
00027     int _y;
00028     int _speed;
00029     int _score;
00030 
00031 };
00032 #endif