ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18s2a_2

Dependencies:   mbed

Apple/Apple.h

Committer:
Psy1990
Date:
2020-06-05
Revision:
11:ba20e1b516a1
Parent:
10:3e37b58e8600
Child:
15:15577b650c2e

File content as of revision 11:ba20e1b516a1:

#ifndef APPLE_H
#define APPLE_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
/** Apple Class File
* @brief Class containing the apple that the snake uses to get score and increase in size.
* @author Simon Atkinson
* @date June 2020
*/


class Apple

{
public:

    Apple();
    ~Apple();
    void init(int size); // Inital setup
    void draw(N5110 &lcd); // Draws the Apple on the LCD
    Vector2D get_pos(); // Needed for Poistioning
    void set_pos(Vector2D a); // Needed for Poistioning

private:

    int _x;  // X Value of Apple
    int _y;  // Y Value of Apple
    int _size; //Size set in main.cpp

};
#endif