1
Dependencies: mbed Gamepad N5110
Food/Food.h
- Committer:
- 1012754868
- Date:
- 2019-05-02
- Revision:
- 6:1ad8c738b9b7
- Parent:
- 3:7b28047013d2
- Child:
- 7:cafa0b96e8d3
File content as of revision 6:1ad8c738b9b7:
#ifndef FOOD_H #define FOOD_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" //#include "Snake.h" /************************Structs************************/ struct Foodpos{ int x; int y; }; /************************Class Def************************/ /** My Food Class * @brief Class for defining Food properties and states * @author Li Saiwen * @date May, 2019 */ class Food{ /************************Public Vars************************/ 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 Vars************************/ private: }; #endif