ST7735 Pong by Jonne Valola, derived work from William Johnston\'s mbed Pong for NokiaLCD / PS2 keyboard This pong uses a rotary encoder hooked to pins 21 and 22, ST7735_TFT library by me, RotaryEncoder library by Shinichiro Nakamura. All copyrights of respective owners. Use on your own risk and discretion.
Dependencies: mbed ST7735_TFT RotaryEncoder TFT_fonts_old
ball.h
- Committer:
- smultron1977
- Date:
- 2011-12-12
- Revision:
- 0:2353da390056
File content as of revision 0:2353da390056:
#include "ST7735_TFT.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(ST7735_TFT &lcd); void draw(ST7735_TFT &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(); };