Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Bat/Bat.h
- Committer:
- shahidsajid
- Date:
- 2019-04-30
- Revision:
- 21:a0904159e183
- Parent:
- 20:9d21599fe350
- Child:
- 26:6427f09cf8d3
File content as of revision 21:a0904159e183:
#ifndef BAT_H
#define BAT_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "UX.h"
/** Ball Class
@author Dr Craig A. Evans, University of Leeds
@brief Controls the ball in the Pong game
@date Febraury 2017
*/
class Bat
{
public:
Bat();
~Bat();
void init(int x,int y);
void draw(N5110 &lcd);
void update();
int get_hitBall(UX &ux);
void reset();
int get_loft_ball(UX &ux);
/// accessors and mutators
private:
Gamepad batPad;
int _hitBall;
int _loft_ball;
int d;
Direction _d;
int _size;
int _x;
int _y;
};
#endif