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.cpp
00001 #include "Food.h" 00002 00003 00004 Food::Food() 00005 { 00006 00007 } 00008 00009 Food::~Food() 00010 { 00011 00012 } 00013 00014 00015 00016 void Food::init(int x, int y) 00017 { 00018 _x = x; 00019 _y = y; 00020 00021 } 00022 00023 int Food::xcoordinate() 00024 { 00025 return _x; 00026 } 00027 00028 int Food::ycoordinate() 00029 { 00030 return _y; 00031 } 00032 00033 void Food::random() 00034 { 00035 _x = rand() % 40; 00036 _y = rand() % 20; 00037 }
Generated on Fri Jul 15 2022 14:43:24 by
1.7.2