Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Game/Game.h
- Committer:
- ale_carb0ni
- Date:
- 2020-05-26
- Revision:
- 2:7fa08670b1fc
- Child:
- 3:c61d0c70eda4
File content as of revision 2:7fa08670b1fc:
#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); bool death(N5110 &lcd,Gamepad &pad); void draw(N5110 &lcd,Gamepad &pad); void gameover(N5110 &lcd,Gamepad &pad); void point(N5110 &lcd,Gamepad &pad); }; #endif