![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Simple Pong game on NokiaLCD with PS2
Dependencies: mbed PS2 NokiaLCD
ball.h
- Committer:
- wjohnsto
- Date:
- 2011-02-28
- Revision:
- 2:d1031c73e187
- Parent:
- 1:3cc8b1413557
File content as of revision 2:d1031c73e187:
#include "NokiaLCD.h" class Ball { /* This class creates a ball object */ // Attributes int x,y,width,height,color,xInc,yInc; public: // Constructors Ball(); Ball(int x, int y, int w, int h, int c, int xi, int yi); // Member functions void move(NokiaLCD &lcd); void draw(NokiaLCD &lcd, bool isBlack) const; int getX() const; int getY() const; bool hitX(); bool hitY(); bool hitP1(int _x, int _y, int _height); bool hitP2(int _x, int _y, int _height); int size() const; void reverseX(); void reverseY(); };