iiitl / snake-game-js

0 stars 44 forks source link

Increased the speed of snake each time it eats #39

Closed itsmeeee0607 closed 4 months ago

itsmeeee0607 commented 4 months ago

Issue #2 Increase Snake Speed When Eating Food Everytime the snake eats it's food, it's speed gets increased by 0.1. In the function which checks if the snake has reached food, I have added an extra line which increments the speed of the snake.

ANKITy102 commented 4 months ago

@itsmeeee0607, reinitialize the speed variable after the collision.

itsmeeee0607 commented 4 months ago

Okk, sure sir.

ANKITy102 commented 4 months ago

@itsmeeee0607, nice work!