![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
1
Dependencies: mbed Gamepad N5110
Food/Food.h
- Committer:
- 1012754868
- Date:
- 2019-05-05
- Revision:
- 7:cafa0b96e8d3
- Parent:
- 6:1ad8c738b9b7
- Child:
- 8:cd73516e85b6
File content as of revision 7:cafa0b96e8d3:
#ifndef FOOD_H #define FOOD_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" /** Enum for Foodpos */ struct Foodpos{ int x; int y; }; /** My Food Class * @brief Class for defining Food properties and states * @author Li Saiwen * @date May, 2019 */ class Food{ public: /** Constructor */ Food(); /** Destructor */ ~Food(); /** initial Food coordinate */ void init(); /** draw Food * @param the subclass of N5110(lcd) */ void drawfood(N5110 &lcd); /** create food randomly */ void createfood(); /** get the coordinate of the Food * @return food x/y coordinate */ Foodpos returnPos(); private: }; #endif