Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: GameObjects/Snake/Snake.h
- Revision:
- 83:329da564799a
- Parent:
- 81:4c1641e10dcd
- Child:
- 87:871d9fecb593
--- a/GameObjects/Snake/Snake.h Mon May 06 10:49:50 2019 +0000 +++ b/GameObjects/Snake/Snake.h Mon May 06 14:28:35 2019 +0000 @@ -18,13 +18,16 @@ * * This function initalises the Snake library. */ - void init(int length, int speed); + void init(N5110 *lcd); + + void _setLength(int length); + void _setSpeed(int speed); /** Draw * * This function draws the Snake sprite onto the screen at the specified coordinates. */ - void draw(N5110 &lcd, int length); + void draw(); /** Set Position * @@ -70,6 +73,11 @@ int _x[10]; //each element in this array represents the x position of each beed in the snake. int _y[10]; //each element in this array represents the y position of each beed in the snake. int _length; + + //Pointer to the game pad object pad. + Gamepad *_pad; + //Pointer to the N5110 object lcd. + N5110 *_lcd; }; #endif \ No newline at end of file