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
snake/snake.h
- Committer:
- weiway
- Date:
- 2018-05-07
- Revision:
- 15:47ea86f1ed70
- Parent:
- 14:9e2ce28b4e63
- Child:
- 20:980b37fde361
File content as of revision 15:47ea86f1ed70:
#ifndef SNAKE_H
#define SNAKE_H
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
class snake
{
public:
snake();
~snake();
void init();
void update(Direction d,float mag);
void draw(N5110 &lcd);
Vector2D get_pos();
void set_pos(Vector2D p);
void point();
int get_point();
private:
int _point;
int _array;
int dir_snake;
void s();
void n();
void e();
void w();
int _xoldpos[100];
int _yoldpos[100];
int _xnewpos[100];
int _ynewpos[100];
};
#endif