When the snake slithers off the left or top border of the grid by a single square, the snake head does not immediately appear on the opposite side. There is a delay of one time step. If the snake head turns either direction during this delay, it next appears on the original side of the grid, in the square adjacent to the one it slithered off from.
For example (H=head, digit=body, dash=blank space):
When the snake slithers off the left or top border of the grid by a single square, the snake head does not immediately appear on the opposite side. There is a delay of one time step. If the snake head turns either direction during this delay, it next appears on the original side of the grid, in the square adjacent to the one it slithered off from.
For example (H=head, digit=body, dash=blank space):
Expected:
Actual: