Starter code for Georgia Tech ECE 2036 Summer 2014 Lab 2
Dependencies: 4DGL-uLCD-SE PinDetect mbed
paddle.h
- Committer:
- jlind6
- Date:
- 2014-06-17
- Revision:
- 0:356124c0bafc
File content as of revision 0:356124c0bafc:
#include "uLCD_4DGL.h" class Paddle { public: // Constructors Paddle(int, int); Paddle(int, int, int, int); // Set Functions void setLength(int); void setWidth(int); void setPaddleMove(int); void setLimits(int, int); // upper and lower limits of the paddle // Get Function int getScore(); // Member Functions void movePaddle(bool); // moves the paddle locations (does not draw!) bool checkHitX(int, int, int); // Using a position and radius, checks to see if something has hit the paddle in the x direction bool checkHitY(int, int, int); // Using a position and radius, checks to see if something has hit the paddle in the y direction void resetScore(); // sets score to 0 void initDraw(uLCD_4DGL *uLCD); // draw the paddle initially (draws the whole thing) void redraw(uLCD_4DGL *uLCD); // draws the paddle for a move (does NOT draw the whole thing) private: // Data members are suggestions, feel free to add/remove int score; int x; int y; int oldy; int length; int width; int paddleMove; int topLimit; int bottomLimit; };