ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18ac

Dependencies:   mbed

Game/Game.h

Committer:
ale_carb0ni
Date:
2020-05-26
Revision:
3:c61d0c70eda4
Parent:
2:7fa08670b1fc
Child:
4:17d5b53b8815

File content as of revision 3:c61d0c70eda4:

#ifndef GAME_H
#define GAME_H

#include "mbed.h"
#include "Gamepad.h"
#include "N5110.h"
#include <vector>
#include "Menu.h"

class Game
{

private:

    int x;
    int y;
    int fruitX [16];
    int fruitY [9];
    int score;
    int a;                              //used to select the direction based ont what button is pressed
    int ntail;                          //used to increase lenght of the tail
    int k;
    int rx;
    int ry;
    char buffer[10];
    int fruitX1;
    int fruitY1;
    vector <int> x_pos;
    vector <int> y_pos;

public:

    Game();

    void movement(Gamepad &pad);
    int death(N5110 &lcd,Gamepad &pad);
    void draw(N5110 &lcd,Gamepad &pad);
    void gameover(N5110 &lcd,Gamepad &pad);
    void point(N5110 &lcd,Gamepad &pad);
};
#endif