Skip to content

Snake can pass through its own body when length is 5 #27

Description

@Zsozsiii

Self-collision is not always detected when the snake has length 5. In certain configurations the head can move onto a cell occupied by its own body segment without triggering game over.
When the snake grows to 5 segments and is steered into its own body, the game sometimes continues instead of ending. From the player’s perspective, the snake “passes through” itself instead of dying immediately on self-collision.
As soon as the snake’s head moves onto any of its own body segments, the game should end and the game over state should be triggered

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions