devsargam / SnakeGame

A simple snake game made with vanilla javascript.
https://snakeinjs.netlify.app/
MIT License
29 stars 22 forks source link

Handle self collision #5

Closed devsargam closed 2 years ago

devsargam commented 2 years ago

Handle the logic for self collision of snake. You can be creative and add your own ideas

sisco0 commented 2 years ago

The selfCollision logic is already implemented at the following source code portion shown at the end of the current comment.

Could you kindly give more details about what is being requested?

https://github.com/devsargam/SnakeGame/blob/1ec9b907c64f3fba9ba152ddd20ef4606ffe2303/js/script.js#L89-L98

devsargam commented 2 years ago

@sisco0 currently selfCollision only logs if there has been a collision or not. I want someone to implement:

restart the game play game over sound use their own creativity for this

I am up for further queries :smile: