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.
Engine/Engine.h
- Committer:
- Andrew_M
- Date:
- 2018-05-07
- Revision:
- 11:b25874e7efe4
- Parent:
- 6:ed553fd191c2
- Child:
- 12:d3eef5ea3f43
File content as of revision 11:b25874e7efe4:
#include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Snek.h" #include "Food.h" class Engine { public: Engine(); ~Engine(); void init(); void read_input(Gamepad &pad); void update(Gamepad &pad); void draw(N5110 &lcd); string convertString(int a); void gameOver(N5110 &lcd); int getScore(); private: int _score; Direction _d; int _grid[22][22]; Snek _solid; //Named after Metal Gear Solid character Solid Snake Food _noodles; //Common foodstuffs in MGS bool _gameOver; };