ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Bat/Bat.h

Committer:
shahidsajid
Date:
2019-04-30
Revision:
20:9d21599fe350
Parent:
18:a260ce8db9e7
Child:
21:a0904159e183

File content as of revision 20:9d21599fe350:

#ifndef BAT_H
#define BAT_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.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();
    void reset();
    int get_loft_ball();
    void first_menu(N5110 &menu_lcd,Gamepad &pad);
    void second_menu(N5110 &menu_lcd);
    void game_over(string message);
    void game_over_menu(N5110 &menu_lcd,int option);
    void victory_menu(N5110 &menu_lcd);
    void info_screen(N5110 &menu_lcd, int target);
    /// accessors and mutators
    
    
private:
   
    
    Gamepad batPad;
    int _hitBall;
    int _loft_ball;
    int d;
    Direction _d;
    int _size;
    int _x;
    int _y;
    bool _button_pressed;
};
#endif