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:
- 4:17d5b53b8815
- Parent:
- 3:c61d0c70eda4
- Child:
- 6:a2c72def99f9
File content as of revision 4:17d5b53b8815:
#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); void updating_position(); 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