Final Commit

Dependencies:   mbed

Food/Food.h

Committer:
JRM1986
Date:
2018-04-12
Revision:
15:4c97fe30f3b7
Parent:
8:a2b431b9b3f7
Child:
17:94dd8a691d4a

File content as of revision 15:4c97fe30f3b7:

#ifndef FOOD_H
#define FOOD_H

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

int g_frame_counter();

static int g_fc;
    
/** Food Class
* @brief Describes the methods and functions for the food
* @author Joshua R. Marshall
* @date Feb, 2018
*/

class Food
{

public:
    Food(); // constructor
    ~Food(); // destructor
    
    void init(int pos_x, int pos_y);
    void update();
    void draw(N5110 &lcd); // draws the food on the lcd

    Vector2D get_rand_pos(); // gets a random number between 0-48, and 0-84
    
    void set_food_position(int set_frames, int number_frames);
    Vector2D get_food_position();
    
private:

    int _x;
    int _y;

};
#endif