Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: SnakevsBlock/SnakevsBlock.cpp
- Revision:
- 47:b448ffd073e7
- Parent:
- 46:dc7dccae9f9e
- Child:
- 48:d774bb162c61
--- a/SnakevsBlock/SnakevsBlock.cpp Fri Apr 26 11:36:01 2019 +0000 +++ b/SnakevsBlock/SnakevsBlock.cpp Fri Apr 26 12:16:05 2019 +0000 @@ -210,13 +210,13 @@ if(blocknum > 0) {b_pos.y = 0;} //change this to speed y = 0 when length = 10. srn = CheckBlock(block); //this tells us which of the 5 blocks we are colliding with blocknum = b_number[srn]; - ImplementCollision(pad); if((_length>=10)&&(b_number[srn]>0)) { //this makes the block stop moving down if it's length is more than 10 and still collides. velocity = 0; } else { velocity = 1; } + ImplementCollision(pad); SnakevsBlock::_set_velocity(); } }