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.cpp
- Committer:
- shahidsajid
- Date:
- 2019-05-01
- Revision:
- 24:23fd6b451db7
- Parent:
- 21:a0904159e183
- Child:
- 26:6427f09cf8d3
File content as of revision 24:23fd6b451db7:
#include "Bat.h"
Bat::Bat()
{
}
Bat::~Bat()
{
}
void Bat::init(int x,int y)
{
batPad.init();
_x = 42;
_y = 15;
_hitBall=0;
}
void Bat::reset(){
_hitBall=0;
_loft_ball=0;
}
void Bat::draw(N5110 &lcd){
lcd.drawLine(38,36,41,36,1);
lcd.drawRect(41,35,6,3,FILL_BLACK);
//ball1.draw();
}
int Bat::get_hitBall(UX &ux){
_hitBall=ux.get_a_pressed();
printf("_hitBall %i \n",_hitBall);
return _hitBall;
}
int Bat::get_loft_ball(UX &ux){
_loft_ball=ux.get_l_pressed();
return _loft_ball;
}