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.
Snake Class Reference
#include <Snake.h>
Public Member Functions | |
Snake () | |
Constructor. | |
~Snake () | |
Destructor. | |
void | draw (N5110 &lcd) |
Set the draw. | |
void | update (Gamepad &pad) |
Set the gamepad. | |
void | deadSnake (N5110 &lcd) |
Set the deadsnake. | |
void | init (int x, int y, int lenght, int _live) |
Set the inital snake. | |
void | addPoint () |
Set the point. | |
void | checkWallCollision (N5110 &lcd) |
Check the wall collision. | |
void | checkTailCollision (N5110 &lcd) |
Check the tail collision. | |
void | drawScore (N5110 &lcd) |
Show the score. | |
Data Fields | |
int | _length |
Show the length. |
Detailed Description
Snake Class.
Does nothing useful
- Date:
- May, 2019
Definition at line 28 of file Snake.h.
Constructor & Destructor Documentation
Member Function Documentation
void addPoint | ( | ) |
Set the point.
- Parameters:
-
food point()
void checkTailCollision | ( | N5110 & | lcd ) |
void checkWallCollision | ( | N5110 & | lcd ) |
void deadSnake | ( | N5110 & | lcd ) |
void draw | ( | N5110 & | lcd ) |
void drawScore | ( | N5110 & | lcd ) |
void init | ( | int | x, |
int | y, | ||
int | lenght, | ||
int | _live | ||
) |
void update | ( | Gamepad & | pad ) |
Field Documentation
Generated on Mon Jul 18 2022 14:19:10 by
