iiitl / snake-game-js

0 stars 43 forks source link

Added difficulty modes #24

Closed vishalparida closed 5 months ago

vishalparida commented 5 months ago

1) Added 3 difficulty modes as described: Easy(no obstacles), Medium(1 obstacle at the centre) and Hard(4 obstacles placed symmetrically). Default difficulty level is set to Easy. Player can select difficulty mode by clicking on the buttons at top-right. 2) Implemented apt logic for "Game Over" if snake hits any of the obstacles. 3) Made necessary styling changes(like toggling selected difficulty button's appearance) and positioning.

Screenshots:

Screenshot 2024-03-15 194638 Screenshot 2024-03-15 194655 Screenshot 2024-03-15 194709 Screenshot 2024-03-15 194725

SOLVED issue #7

ANKITy102 commented 5 months ago

@vishalparida, You did not add the logic for the food that it does not generate on the obstacles.

vishalparida commented 5 months ago

@ANKITy102 I have fixed the bug. Please review it. Issue #7

ANKITy102 commented 5 months ago

@vishalparida, Good Work!