![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Simple Pong game on NokiaLCD with PS2
Dependencies: mbed PS2 NokiaLCD
Diff: paddle.h
- Revision:
- 0:93dce1e528b9
- Child:
- 1:3cc8b1413557
diff -r 000000000000 -r 93dce1e528b9 paddle.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paddle.h Sun Feb 27 23:35:17 2011 +0000 @@ -0,0 +1,29 @@ +#include "NokiaLCD.h" + +class Paddle { + /* This class creates a paddle object */ + + // Attributes + int x,y,width,height,color,lives,score; + +public: + // Constructor + Paddle(); + Paddle(int x, int y, int w, int h, int c, int l, int s); + + // Member functions + void move(NokiaLCD &lcd, int increment); + void moveCPU(NokiaLCD &lcd, int _y); + void draw(NokiaLCD &lcd, bool isBlack) const; + bool loseLife(); + void addPoint(); + int size() const; + int getWidth() const; + int getHeight() const; + int getX() const; + int getY() const; + int getLives() const; + int getScore() const; + void setLives(int l); + +}; \ No newline at end of file