Simple Pong game on NokiaLCD with PS2
Dependencies: mbed PS2 NokiaLCD
paddle.h
00001 #include "NokiaLCD.h" 00002 00003 class Paddle { 00004 /* This class creates a paddle object */ 00005 00006 // Attributes 00007 int x,y,width,height,color,lives,score; 00008 00009 public: 00010 // Constructors 00011 Paddle(); 00012 Paddle(int x, int y, int w, int h, int c, int l, int s); 00013 00014 // Member functions 00015 void move(NokiaLCD &lcd, int increment); 00016 void moveCPU(NokiaLCD &lcd, int _y); 00017 void draw(NokiaLCD &lcd, bool isBlack) const; 00018 bool loseLife(); 00019 void addPoint(); 00020 int size() const; 00021 int getWidth() const; 00022 int getHeight() const; 00023 int getX() const; 00024 int getY() const; 00025 int getLives() const; 00026 int getScore() const; 00027 void setLives(int l); 00028 00029 };
Generated on Tue Jul 12 2022 18:11:13 by 1.7.2