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/Food.h
- Committer:
- VivianDu
- Date:
- 2019-05-06
- Revision:
- 8:92abf7b858e9
- Parent:
- 7:54ba05b72fa8
- Child:
- 11:0f169c4ecd0a
File content as of revision 8:92abf7b858e9:
#ifndef FOOD_H
#define FOOD_H
#include <math.h>
#include <stdlib.h>
#include "Gamepad.h"
#include "mbed.h"
#include "N5110.h"
//libraries including
/** pos struct */
struct pos{
int x;/**< int for x value */
int y;/**< int for y value */
}; //define position of food
class Food{
public:
/** Constructor */
Food();
/** Destructor */
~Food();
/** Set the screen
* @param init ()
*/
void init();
/** Draw the screen
* @param (N5110 &lcd)
*/
void draw(N5110 &lcd);
/** Get the response
* @param ()
*/
void response();
/** Get the score
* @return the current score
*/
pos returnPos();
private:
};//define functions
#endif