![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
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
paddle.h
- Committer:
- smultron1977
- Date:
- 2011-12-12
- Revision:
- 0:2353da390056
File content as of revision 0:2353da390056:
#include "ST7735_TFT.h" class Paddle { /* This class creates a paddle object */ // Attributes int x,y,width,height,color,lives,score; public: // Constructors Paddle(); Paddle(int x, int y, int w, int h, int c, int l, int s); // Member functions void move(ST7735_TFT &lcd, int increment); void moveCPU(ST7735_TFT &lcd, int _y); void draw(ST7735_TFT &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); };