Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: GameEngine/SnakevsBlock/SnakevsBlock.cpp
- Revision:
- 74:7b6568bc16d5
- Parent:
- 71:4bd2b27693f3
- Child:
- 76:7fa91122907f
--- a/GameEngine/SnakevsBlock/SnakevsBlock.cpp Sun May 05 10:58:33 2019 +0000 +++ b/GameEngine/SnakevsBlock/SnakevsBlock.cpp Sun May 05 11:46:08 2019 +0000 @@ -21,6 +21,7 @@ send_block_number = 0; //this is 0 when there is no collision, thus block number isn't remembered for next set (which would lead to empty blocks). blockgap = 300; //this is the number of itterations the block will reccur after in the first level. + //To make default motion of the snake free. for(int i=0; i<=9; i++) { b[i] = 1; } @@ -34,6 +35,10 @@ if(blockgap >= 60) { blockgap -= 10; //to make progressive levels harder by making the blocks drop more frequently. } + //To make default motion of the snake free. + for(int i=0; i<=9; i++) { + b[i] = 1; + } } void SnakevsBlock::object_initialisations()