Snake wrongly eats itself
shivangg opened this issue · comments
Shivang Tripathi commented
The snake dies when the opposite direction arrow key( w.r.t. snake current direction ) is pressed immediately after non-opposite arrow key. This is because the game is not effectively ignoring the opposite arrow keys. Shift the ignore mechanics from Game component to SnakeBody component so that the ignore check is done on every update of the snake state.