ELEC2645 (2018/19) / Mbed 2 deprecated el17ebs

Dependencies:   mbed FATFileSystem

GolfEngine/GolfEngine.h

Committer:
ellisbhastroud
Date:
2019-04-18
Revision:
8:d410856c6d04
Parent:
5:0b31909caf7f
Child:
9:bc34f2243e43

File content as of revision 8:d410856c6d04:

#ifndef GOLFENGINE_H
#define GOLFENGINE_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Ball.h"


/** Golf Engine Class
* @brief Library to run golf game
* @author Ellis Blackford Stroud
* @date May, 2018
*/


class GolfEngine 
{

public:

    /** Constructor */
    GolfEngine();

    /** Destructor */
    ~GolfEngine();
    
    void init();
    
    void drawGame(N5110 &lcd, Gamepad &pad);
    
    void read_input(Gamepad &pad);
    
    void update_ball(Gamepad &pad, int frame_rate);
    
    void drawCourseWalls(N5110 &lcd, Course map[], int size);
    
    void check_wall_bounce();
    
    void set_level(int level);

    int get_level();

private:

    int _x_pos;
    int _y_pos;
    int _level;
    
    float _mag;
    Vector2D _joy_coord;
    float _angle;

    Ball _ball;

};

#endif