I have updated the game logic to detect when the snake bites itself and implemented the functionality to end the game when the snake bites itself.
I have also ensured that the game over condition on self-biting provides appropriate feedback to the player.
I have resolved the issue #4,please look into it.
https://github.com/iiitl/snake-game-js/assets/143504391/7ff537fc-1ac5-40c1-822e-1523501ab7de
I have updated the game logic to detect when the snake bites itself and implemented the functionality to end the game when the snake bites itself. I have also ensured that the game over condition on self-biting provides appropriate feedback to the player.