Brickbreaker

Dependencies:   NokiaLCD PS2 mbed

Fork of Pong by William Johnston

Committer:
ipapp3
Date:
Mon Apr 29 18:17:51 2013 +0000
Revision:
4:f3ac45fa2196
Parent:
3:e1328f84b107
final

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wjohnsto 0:93dce1e528b9 1 #include "NokiaLCD.h"
wjohnsto 0:93dce1e528b9 2
wjohnsto 0:93dce1e528b9 3 class Paddle {
wjohnsto 0:93dce1e528b9 4 /* This class creates a paddle object */
wjohnsto 0:93dce1e528b9 5
wjohnsto 0:93dce1e528b9 6 // Attributes
wjohnsto 0:93dce1e528b9 7 int x,y,width,height,color,lives,score;
wjohnsto 0:93dce1e528b9 8
wjohnsto 0:93dce1e528b9 9 public:
wjohnsto 1:3cc8b1413557 10 // Constructors
wjohnsto 0:93dce1e528b9 11 Paddle();
wjohnsto 0:93dce1e528b9 12 Paddle(int x, int y, int w, int h, int c, int l, int s);
wjohnsto 0:93dce1e528b9 13
wjohnsto 0:93dce1e528b9 14 // Member functions
wjohnsto 0:93dce1e528b9 15 void move(NokiaLCD &lcd, int increment);
wjohnsto 0:93dce1e528b9 16 void moveCPU(NokiaLCD &lcd, int _y);
wjohnsto 0:93dce1e528b9 17 void draw(NokiaLCD &lcd, bool isBlack) const;
wjohnsto 0:93dce1e528b9 18 bool loseLife();
ipapp3 3:e1328f84b107 19 void addPoints(int p);
wjohnsto 0:93dce1e528b9 20 int size() const;
wjohnsto 0:93dce1e528b9 21 int getWidth() const;
wjohnsto 0:93dce1e528b9 22 int getHeight() const;
wjohnsto 0:93dce1e528b9 23 int getX() const;
wjohnsto 0:93dce1e528b9 24 int getY() const;
wjohnsto 0:93dce1e528b9 25 int getLives() const;
wjohnsto 0:93dce1e528b9 26 int getScore() const;
wjohnsto 0:93dce1e528b9 27 void setLives(int l);
ipapp3 3:e1328f84b107 28 void setScore(int s);
wjohnsto 0:93dce1e528b9 29
wjohnsto 0:93dce1e528b9 30 };