ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Bat/Bat.cpp

Committer:
shahidsajid
Date:
2019-05-07
Revision:
28:d0b0a64a832d
Parent:
26:6427f09cf8d3
Child:
30:43aace0fdbdf

File content as of revision 28:d0b0a64a832d:

#include "Bat.h"


Bat::Bat()
{

}

Bat::~Bat()
{

}
void Bat::init(int x,int y)
{   
    //batPad.init();
    _bat_x = 42;
    _bat_y = 15;
    _hitBall=0;
    _loft_ball=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);
}
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;
}