Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: GameEngine/SnakevsBlock/SnakevsBlock.cpp
- Revision:
- 67:39b9ba6019b0
- Parent:
- 65:2872ca289b49
- Child:
- 68:b9cfd27987ac
--- a/GameEngine/SnakevsBlock/SnakevsBlock.cpp Fri May 03 22:39:38 2019 +0000 +++ b/GameEngine/SnakevsBlock/SnakevsBlock.cpp Sat May 04 12:28:04 2019 +0000 @@ -12,6 +12,7 @@ void SnakevsBlock::init() { + SnakevsBlock::object_initialisations(); //The level initialisation and all the other initial information passing will be done here level = 1; _maxLength = 10; // this makes us go to the next level if if maxLength is achieved; @@ -22,17 +23,16 @@ for(int i=0; i<=14; i++) { b[i] = 1; //makes all the snake beads move by default. } - SnakevsBlock::object_initialisations(); } void SnakevsBlock::reset() { + SnakevsBlock::object_initialisations(); //This prepares the game for the next level by reseting certain variables. _dropbuff = 0; - if(blockgap >= 50) { + if(blockgap >= 60) { blockgap -= 10; //to make progressive levels harder by making the blocks drop more frequently. } - SnakevsBlock::object_initialisations(); } void SnakevsBlock::object_initialisations()