Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: Snake/Snake.h
- Revision:
- 7:48ba87cd79b5
- Child:
- 8:890b986b16a4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Snake/Snake.h Tue Mar 26 14:45:15 2019 +0000 @@ -0,0 +1,49 @@ +#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); + + /** Update + * + * This function updates the player sprite position on screen. + */ + void update(Direction d,float mag); + + /** 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 _y; + int _speed; + +}; +#endif \ No newline at end of file