ELEC2645 (2017/18) / Mbed 2 deprecated ll14zs

Dependencies:   mbed

Fork of ll14zs by Zeshaan Saeed

Car/Car.h

Committer:
ll14zs
Date:
2018-05-24
Revision:
3:1231a3961984
Parent:
2:5d3aac7fd3df

File content as of revision 3:1231a3961984:

#ifndef CAR_H
#define CAR_H

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

 /** Car Class
@author Zeshaan Saeed
@brief Controls the car in the Dash game
@date May 2018
*/ 

class Car

{

public:

    Car();
    ~Car();
    
/**
@brief Initialise the Car
*/
    void init(int x, int y, int width, int height);
    
/** 
@brief Draws Car
*/ 
    void draw(N5110 &lcd);
    
/** 
@brief Updates Car
*/
    void update(Direction d);
    
/** 
@brief Gets the position
*/
    Vector2D get_pos();
    
/** 
@brief Sets the Position
*/
    void set_pos(Vector2D p);
    
/** 
@brief Gets Velocity of car
*/
    Vector2D get_velocity();
    
/** 
@brief Sets Velocity
*/
    void set_velocity(Vector2D v);
    
/** 
@brief Adds Score
*/
    void add_score();
    
/** 
@brief Gets the Score
*/
    int get_score();


private:

    //Car Parameters
    int i;
    int _x;
    int _y;
    int _width;
    int _height;
    int _speed;
    int _score;
    Vector2D _velocity;

};
#endif