![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
Diff: GameEngine/SnakevsBlock/SnakevsBlock.h
- Revision:
- 84:9950d561fdf8
- Parent:
- 83:329da564799a
- Child:
- 87:871d9fecb593
--- a/GameEngine/SnakevsBlock/SnakevsBlock.h Mon May 06 14:28:35 2019 +0000 +++ b/GameEngine/SnakevsBlock/SnakevsBlock.h Mon May 06 16:15:21 2019 +0000 @@ -57,6 +57,12 @@ */ void lightTheLEDS(); + /** Update Snake Length And Movement + * + * This function updates length and motion data inside the snake class and also uses the length manager class to update length. + */ + void updateSnakeLengthAndMovement(); + /** Draw * * This function contains the draw functions of the other libraries used in the game. @@ -157,9 +163,9 @@ */ void CheckSnakeBlockSidesXCollision(int i); - /** Check Collision East or West + /** Check Block sides Collision is East or West * - * checks if the colliding wall is on east side or west side and then calls StopX_AxisMotion(length,i) to carry out the required task. + * checks if the colliding wall is on east side or west side and then calls ImplementBarrierCollision(i) to carry out the required task. */ void CheckSnakeBlockSidesEastWestCollision(int X, int i); @@ -168,12 +174,17 @@ * This function checks if the Snake has come into contact with any the sides of the barriers and stops it moving in the X axis if true. */ void CheckSnakeBarrierCollision(int bar_sr_no); - + /** Check Collision in Y axis * * This function checks if the Snake and blocks collide anywhere in the Y axis. */ void CheckSnakeBarrierYCollision(int i, int bar_sr_no); //i is the index of the snake beed and checks for all possible collisions with the snake respective to it's length. + + /** Check Barrier Collision is East or West + * + * checks if the colliding barrier's side is on east side or west side of snake and then calls ImplementBarrierCollision(i) to carry out the required task. + */ void CheckSnakeBarrierEastWestCollision(int i, int bar_sr_no); //i checks for all possible collisions with the snake respective to it's length. /** Make Virtual Length Max Ten @@ -200,7 +211,7 @@ Barriers _barA; Barriers _barB; Stats _Setstats; - + //Pointer to the game pad object pad. Gamepad *_pad; //Pointer to the N5110 object lcd.