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.
Diff: Food/Food.cpp
- Revision:
- 15:130900e5c268
- Parent:
- 7:c1e0593bfc99
- Child:
- 17:2a909f7da973
--- a/Food/Food.cpp Tue May 08 13:15:41 2018 +0000 +++ b/Food/Food.cpp Tue May 08 14:06:47 2018 +0000 @@ -11,9 +11,10 @@ } +//No major comments are needed as all fucntions are simple and self explanatory + void Food::init(int x, int y) -{ - //Inital values for variables +{ _x = x; _y = y; } @@ -30,6 +31,6 @@ void Food::random() { - _x = rand() % 22; + _x = rand() % 22; //randomly generates a number between 0 and 21 _y = rand() % 22; } \ No newline at end of file