Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Revision:
81:4c1641e10dcd
Parent:
79:35cb65c52d25
Child:
82:c51ae8a501d1
--- a/GameEngine/SnakevsBlock/SnakevsBlock.h	Mon May 06 08:00:56 2019 +0000
+++ b/GameEngine/SnakevsBlock/SnakevsBlock.h	Mon May 06 09:05:09 2019 +0000
@@ -10,6 +10,7 @@
 #include "WinLoose.h"
 #include "SnakeFood.h"
 #include "Blocks.h"
+#include "Barriers.h"
 #include "StartScreen.h"
 #include "Stats.h"
 #include "SDFileSystem.h"
@@ -183,6 +184,8 @@
     SnakeFood _ff;
     SnakeFood _fff;
     Blocks _b;
+    Barriers _barA;
+    Barriers _barB;
     Stats _Setstats;
 
     //OBJECT POSITIONS ON SCREEN.
@@ -191,6 +194,7 @@
     Vector2D snake_pos[10]; //saves the position of all the snake beeds in an array for ease of collision processing.
     Vector2D food_pos[3]; //saves the position of all 3 snake food on the screen in a single array for ease of collision processing.
     Vector2D b_pos; //saves the origin of the blocks on the screen (this is the top left corner of the block row).
+    Vector2D bar_pos; //saves the origin of the barrier on the screen (this is the top left corner of the barrier).
 
     //LEVEL PROGRESSION, FAILURE AND STATISTICS PARAMETERS.
     int level; // this is diffrent to int _length as this stops at 10 to not complicate collisions as the snake doesn't grow longer than 10 visually.
@@ -198,7 +202,7 @@
     int back; //enables the player to go back on main menu if back is pressed.
     int _maxLength; // this makes us go to the next level if if maxLength is achieved;
 
-    //SNAKE X AXIS VELOCITY, SNAKE LENGTH ,MAX VIRTUAL LENGTH AND VARABLE THAT ALLOWS FREE MOTION OF A SPECIFIC BEED NUMBER OF THE SNAKE.
+    //Block, Food and Barrier Y AXIS VELOCITY, SNAKE LENGTH ,MAX VIRTUAL LENGTH AND VARABLE THAT ALLOWS FREE MOTION OF A SPECIFIC BEED NUMBER OF THE SNAKE.
     int velocity; //this is to stop/move the background (food and blocks), when collision occurs at a length greater than 10.
     int _length; //this is diffrent to the _virtualLength as this saves the length of the snake, for collision detection relative to it's length and calculations.
     int _virtualLength; //saves the length of the snake, for collision detection relative to it's Max screen length.