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
Food Class Reference
#include <Food.h>
Public Member Functions | |
| void | init (bool collision) |
| Initialise position of food. | |
| void | update (bool collision, int n_frames) |
| Updates food state. | |
| void | draw (N5110 &lcd) |
| Draws food on lcd. | |
| Vector2D | get_rand_pos () |
| Gets a random position for spawning food. | |
| void | set_food_position (int set_frames, int number_frames, bool collision) |
| resets food position when collsion event or a set number of frames have passed | |
| Vector2D | get_food_position () |
Detailed Description
Food Class.
Describes the methods and functions for the food class
- Date:
- Feb, 2018
Definition at line 20 of file Food.h.
Member Function Documentation
| Vector2D get_food_position | ( | ) |
| Vector2D get_rand_pos | ( | ) |
| void set_food_position | ( | int | set_frames, |
| int | number_frames, | ||
| bool | collision | ||
| ) |
Generated on Wed Aug 3 2022 05:55:53 by
1.7.2