![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
1
Dependencies: mbed Gamepad N5110
Food/Food.h
- Committer:
- 1012754868
- Date:
- 2019-05-05
- Revision:
- 8:cd73516e85b6
- Parent:
- 7:cafa0b96e8d3
- Child:
- 9:5f73221012bf
File content as of revision 8:cd73516e85b6:
#ifndef FOOD_H #define FOOD_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" /** Enum for Foodpos */ struct Foodpos{ int x; /**< Food X coordirate*/ int y; /**< Food Y coordirate*/ }; /** 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