ELEC2645 (2018/19) / Mbed 2 deprecated el17ebs

Dependencies:   mbed FATFileSystem

GolfEngine/GolfEngine.h

Committer:
ellisbhastroud
Date:
2019-04-23
Revision:
10:9f54a6366e94
Parent:
9:bc34f2243e43
Child:
12:7f7fadb5c106

File content as of revision 10:9f54a6366e94:

#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(int frame_rate);
    
    void new_level();
    
    void drawGame(N5110 &lcd, Gamepad &pad);
    
    void read_input(Gamepad &pad);
    
    void update_ball(Gamepad &pad);
    
    void drawCourseWalls(N5110 &lcd, WallMap map[], int size);
    
    void drawHole(N5110 &lcd, Coord hole);
    
    void printLevel(N5110 &lcd);
    
    void set_level(int level);

    int get_level();
    
    bool get_hole_flag();
    
    void reset_hole_flag(); 

private:

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

    Ball _ball;

};

#endif