ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jgb

Dependencies:   mbed

Eng.h

Committer:
el18jgb
Date:
2020-05-14
Revision:
4:6f898b000797
Child:
5:c37f4ed2cad3

File content as of revision 4:6f898b000797:

#ifndef ENG_H
#define ENG_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Basket.h"
#include "Heston.h"

// gap from edge of screen
#define GAP 2

class Eng
{

public:
    Eng);
    ~Eng();

    void init();
    void read_input(Gamepad &pad);
    void update(Gamepad &pad);
    void draw(N5110 &lcd);
    
private:

    void check_hitGamepad &pad);
    void check_miss(Gamepad &pad);
    void print_scores(N5110 &lcd);
    
    Heston _h1;
    Heston _h2;
    Heston _h3;
     
    int _paddle_width;
    int _paddle_height;
    int _ball_size;
    int _speed;
    
    // positions
    int _h1x;
    int _h2x;
    int _h3x;
    int _h2y;
    int _h1y;
    int _h3y;
    
    Aim _aim;
    
    Direction _d;
    float _mag;

};

#endif