snake icon indicating copy to clipboard operation
snake copied to clipboard

Left and top borders don't seem to wrap properly

Open matomatical opened this issue 2 years ago • 0 comments

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:

Time 0:
- - - H 1 2 3 -
- - - - - - - -
- - - - - - - - 

(press up)

Time 1:
- - - 1 2 3 - -
- - - - - - - -
- - - H - - - - 

(press right)

Time 2:
- - - 2 3 - - -
- - - - - - - -
- - - 1 H - - - 

Actual:

Time 0:
- - - H 1 2 3 -
- - - - - - - -
- - - - - - - - 

(press up)

Time 1:
- - - 1 2 3 - -
- - - - - - - -
- - - - - - - - 

(press right)

Time 2:
- - - 2 H/3 - - -
- - - - - - - -
- - - - - - - - 

H and 3 on the same grid square. Game over.

matomatical avatar May 10 '22 09:05 matomatical