![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
Diff: SnakevsBlock/SnakevsBlock.h
- Revision:
- 38:30e4e6191762
- Parent:
- 37:ee47699915b8
- Child:
- 39:210ac915e0a0
--- a/SnakevsBlock/SnakevsBlock.h Thu Apr 18 14:03:43 2019 +0000 +++ b/SnakevsBlock/SnakevsBlock.h Mon Apr 22 04:24:38 2019 +0000 @@ -3,6 +3,7 @@ #include "mbed.h" #include "N5110.h" +#include "FXOS8700CQ.h" #include "Gamepad.h" #include "Snake.h" #include "SnakeFood.h" @@ -27,7 +28,7 @@ * * This function obtains numeric data from the gamepads joystick. */ - void read_input(Gamepad &pad); + void read_input(Gamepad &pad, FXOS8700CQ &device, int gm); /** Update * @@ -64,6 +65,8 @@ int snakey; int length; int level; + int garbage; //to save the angle at the point button A is pressed. + float angle; //saves the angle of tilt. int foodbuff; //this makes food 1,2,and 3 come at seperate times int blocknum; int blockgap; //to change frequency of fall @@ -106,6 +109,6 @@ * * This function checks if the Snake has come into contact with any the sides of the block and stops it moving. */ - void CheckSnakeBlockSidesCollision(Gamepad &pad, Direction d); + void CheckSnakeBlockSidesCollision(Gamepad &pad); }; #endif \ No newline at end of file