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.
Food.h
00001 #ifndef FOOD_H 00002 #define FOOD_H 00003 00004 #include <math.h> 00005 #include <stdlib.h> 00006 #include "Gamepad.h" 00007 #include "mbed.h" 00008 #include "N5110.h" 00009 //libraries including 00010 00011 /** pos struct */ 00012 struct pos{ 00013 00014 int x;/**< int for x value */ 00015 int y;/**< int for y value */ 00016 00017 }; //define position of food 00018 00019 /** Food Class 00020 * @brief Does nothing useful 00021 * @author Du Xianjie 00022 * @date May, 2019 00023 */ 00024 00025 class Food{ 00026 00027 public: 00028 /** Constructor */ 00029 Food(); 00030 /** Destructor */ 00031 ~Food(); 00032 00033 /** Set the screen 00034 * @param init () 00035 */ 00036 void init(); 00037 /** Draw the screen 00038 * @param (N5110 &lcd) 00039 */ 00040 void draw(N5110 &lcd); 00041 /** Get the response 00042 * @param () 00043 */ 00044 void response(); 00045 /** Get the score 00046 * @return the current score 00047 */ 00048 pos returnPos(); 00049 00050 private: 00051 00052 00053 };//define functions 00054 #endif
Generated on Mon Jul 18 2022 14:19:10 by
