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.
Snek Class Reference
The Snake class. More...
#include <Snek.h>
Public Member Functions | |
| Snek () | |
| Constructor. | |
| ~Snek () | |
| Destructor. | |
| void | init (int x, int y) |
| Initialisation function. | |
| void | update (Direction d) |
| Updates the location of the snake. | |
| int | getX (int ref) |
| Gets an X coordinate of the snake. | |
| int | getY (int ref) |
| Gets an Y coordinate of the snake. | |
| int | getLength () |
| Gets the length of the snake. | |
| void | grow () |
| Grows the snake in length. | |
Detailed Description
The Snake class.
Stores the location of all the snake segments, handles movement and growth of the snake
- Date:
- May, 2018
Definition at line 14 of file Snek.h.
Constructor & Destructor Documentation
Member Function Documentation
| int getLength | ( | ) |
| int getX | ( | int | ref ) |
| int getY | ( | int | ref ) |
| void init | ( | int | x, |
| int | y | ||
| ) |
Generated on Sun Jul 17 2022 04:24:16 by
1.7.2