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
Eng Class Reference
#include <Eng.h>
Public Member Functions | |
| Eng () | |
| Constructor. | |
| ~Eng () | |
| Destructor. | |
| void | init () |
| The init function. | |
| void | userinput (Gamepad &pad) |
| load map function | |
| void | draw (N5110 &lcd) |
| draw the game picture @param use LCD to draw | |
| void | score (N5110 &lcd) |
| draw the game over picture @param give score and wait 5 seconds to play again | |
| void | update (Gamepad &pad) |
| Updates game state. | |
| float | getScore () |
| Gets score. | |
| bool | getGameOver () |
| Gets gameover. | |
| bool | checkFood () |
| Gets checkFood. | |
| void | growSnake () |
| extand the snake function | |
| void | dead () |
| check weather the snake dead | |
Data Fields | |
| bool | _gameOver |
| Gets _gameOver. | |
| int | _score |
| some variables used to save score direction, map, food and others | |
Detailed Description
The Game class.
Handles all failure states and game drawing
- Date:
- May 2019
Definition at line 13 of file Eng.h.
Constructor & Destructor Documentation
Member Function Documentation
| bool checkFood | ( | ) |
| void dead | ( | ) |
| void draw | ( | N5110 & | lcd ) |
| void growSnake | ( | ) |
| void score | ( | N5110 & | lcd ) |
| void update | ( | Gamepad & | pad ) |
| void userinput | ( | Gamepad & | pad ) |
Field Documentation
Generated on Fri Jul 15 2022 14:43:24 by
1.7.2