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.
Dependencies: mbed Gamepad N5110
snake/snake.h
- Committer:
- 694617778
- Date:
- 2019-04-02
- Revision:
- 0:b67614a0c4cf
- Child:
- 1:b49c36604125
File content as of revision 0:b67614a0c4cf:
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
class snake
{
public:
snake();
~snake();
void update();
void init(int x,int y,int size,int speed);
void draw(N5110 &lcd);
void add_score();
int get_score();
Vector2D get_pos();
private:
Vector2D _velocity;
int _size;
int _x;
int _y;
int _score;
};