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.
Snake/Snake.h
- Committer:
- AhmedPlaymaker
- Date:
- 2019-03-26
- Revision:
- 8:890b986b16a4
- Parent:
- 7:48ba87cd79b5
- Child:
- 9:d1d79d4ee673
File content as of revision 8:890b986b16a4:
#ifndef Snake_H #define Snake_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" class Snake { public: Snake(); ~Snake(); /** Initialise Player * * This function initalises the player library. */ void init(); /** Draw * * This function draws the Player sprite onto the screen at the specified coordinates. */ void draw(N5110 &lcd, int length); /** Update * * This function updates the player sprite position on screen. */ void update(Direction d,float mag,int length); /** Get Position * * This function obtains the coordinate of the top-left pixel in the player sprite. */ Vector2D get_pos(); private: int m; int _x; int _xa; int _xb; int _xc; int _xd; int _xe; int _xf ; int _xg; int _xh; int _xi; int _xj; int _xk; int _xl; int _xm; int _xn; int _y; int _speed; }; #endif