Snake game snake library
Diff: Snake.h
- Revision:
- 2:5e04e34a3b66
- Parent:
- 1:93a4cb86f100
- Child:
- 3:b24ef00836c5
--- a/Snake.h Fri May 05 10:36:54 2017 +0000 +++ b/Snake.h Fri May 05 11:55:34 2017 +0000 @@ -5,7 +5,7 @@ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" -#include "GameEngine.h" +#include "Food.h" #include <deque> struct snakePart{ @@ -25,9 +25,11 @@ void init(int x, int y, int lenght); void draw(N5110 &lcd); void update(Gamepad &pad); + void deadSnake(N5110 &lcd); snakePart add_point(int x, int y); - void get_length(); + void checkWallCollision(N5110 &lcd); int _length; + int live; @@ -37,14 +39,18 @@ int _speed; int _direction; + int counter; int startx; int starty; + //int _snakeX[4000]; //int _snakeY[4000]; //int _snakeDir[4000]; int x; Direction d; + //Gamepad pad; + //GameEngine engine; };