Davon Cleary / Mbed 2 deprecated Lab2

Dependencies:   4DGL-uLCD-SE PinDetect SDFileSystem mbed-rtos mbed wave_player

Fork of ECE2036Lab2StarterCode by Joseph Lind

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers paddle.h Source File

paddle.h

00001 #include "uLCD_4DGL.h"
00002 #ifndef PADDLE_H
00003 #define PADDLE_H
00004 
00005 class Paddle 
00006 {
00007 public:
00008     // Constructors
00009     Paddle();
00010     
00011     // Set Functions
00012     void setLength(int);
00013     void setWidth(int);
00014     void setPaddleMove(int);
00015     void setScore(int);
00016     void setX(int);
00017     void setY(int);
00018     void setOldY(int);
00019     
00020     // Get Function
00021     int getLength();
00022     int getWidth();
00023     int getPaddleMove();
00024     int getScore();
00025     int getX();
00026     int getY();
00027     int getOldY();
00028     
00029     // Member Functions
00030     void movePaddleUp();
00031     void movePaddleDown();
00032     void resetScore(); // sets score to 0
00033     void initDraw(uLCD_4DGL *uLCD); // draw the paddle initially (draws the whole thing)
00034     void redraw(uLCD_4DGL *uLCD); // draws the paddle for a move (does NOT draw the whole thing)
00035     
00036 
00037 private:
00038     int score;
00039     int x;
00040     int y;
00041     int oldy;
00042     int length;
00043     int width;
00044     int paddleMove;
00045 };
00046 
00047 #endif