1
Dependencies: mbed Gamepad N5110
Food/Food.h
- Committer:
- 1012754868
- Date:
- 2019-05-05
- Revision:
- 9:5f73221012bf
- Parent:
- 8:cd73516e85b6
- Child:
- 10:7cb79dbb351a
File content as of revision 9:5f73221012bf:
#ifndef FOOD_H #define FOOD_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" /**Foodpos struct */ struct Foodpos{ int x; /**< Food X coordinate*/ int y; /**< Food Y coordinate*/ }; /** 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 according to the food coordinate * @param the subclass of N5110(lcd) */ void drawfood(N5110 &lcd); /** create food on the map randomly */ void createfood(); /** Gets polar coordinates of the Food * @returns a struct contains Food x coordinate and Food y coordinate */ Foodpos returnPos(); private: }; #endif