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.
foods/foods.h
- Committer:
- Ting12138
- Date:
- 2020-05-14
- Revision:
- 13:a57a48e5e256
- Parent:
- 12:3b7811c3502c
File content as of revision 13:a57a48e5e256:
#ifndef FOODS_H
#define FOODS_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
class foods
{
public:
foods();
~foods();
void init(int x,int bulk,int velocity);
/**
*param N5110 @details LCD screen
*brief Displays food on screen
*/
void draw(N5110 &lcd);
// accessors and mutators
/**
* returns The new coordinate of foods
* brief Updates the locations of foods
*/
void update();
/**
* returns The new coordinate of foods
* brief Resets the locations of foods
*/
void replace();
/**
* returns The coordinate of foods
* brief Retrieves the locations of foods
*/
Vector2D get_locations();
private:
int _bulk; // the foods'raions
int _x;
int _y;
int _velocity;
};
#endif