Break Club
How to play
Your break style

Saved in this browser. Your game stays the same.

Snake collision: a wall is not the moving tail

A wall remains outside the board, while the last tail square can become free during a non-growing step. That difference can make entry into the current tail position legal without permitting passage through the body generally. Check the destination and which segment leaves, not simply whether a turn is perpendicular.

0 fruit · 3 of 144 cells · 0 steps

The game is stationary. Enable JavaScript to use the controls.

The head uses an arrow, the body fills cells, and fruit is marked ●.

Inside the game: steer with arrow keys or WASD. With the board focused, Enter or Space starts or pauses; Escape also pauses. Use Tab, then Enter or Space on the buttons.

Initial head: row 6, column 6. Heading: right. Food is placed when the game starts.

Enable JavaScript to play.

Saved locally; progress does not sync between devices.

Text describes position, heading, and food. This continuously moving game still requires following the visual board; full nonvisual accessibility is not claimed.

Start another game?

Only the saved Snake board will be replaced.

How to play

Snake rules

Choose Start, then steer with arrow keys, WASD, or the direction buttons. Eat fruit to grow by one segment and gain one point. Hitting a wall or your body ends the game. An immediate reverse turn is ignored. Pause and leaving the tab stop movement. The board is 12 × 12, and progress is saved only in this browser.

A border does not move when the snake moves

If the head occupies the top row and advances upward, its next position lies outside the grid. No tail movement creates a new row there, and the game does not wrap the head from one edge to the opposite edge. A visible gap elsewhere on the board cannot make that out-of-bounds destination legal.

This is separate from the opposite-direction restriction. A turn can pass the heading check and still hit a border. If you are traveling right along the top row, choosing up is perpendicular but out of bounds. Inspect both conditions rather than interpreting an accepted direction request as certification that its destination is safe.

Track the body as an ordered sequence

The head enters a new square on the next step. Without fruit, the last tail segment is removed, so the length stays the same. Other body positions do not all vanish or shift into unrelated empty places at once. Their order determines which occupied square is actually vacated.

When fruit is eaten, the body grows and retains the extra segment instead of shortening at its tail for that update. A general statement that “the tail always leaves” therefore omits the growth condition. That does not mean fruit normally sits underneath a body segment; the useful point is to reason about the actual update rather than a static outline alone.

A small legal tail-entry example

Use row and column numbers starting at one from the top and left. Consider a four-segment body ordered from head to tail as row 3 column 3, row 3 column 2, row 2 column 2, and row 2 column 3. Its current travel is rightward, and the fruit is elsewhere, such as row 5 column 5.

Turning upward moves the head into row 2 column 3, the current final tail position. That last segment leaves during the same non-growing step. The snake keeps four segments and receives no fruit point. The example describes one constructed transition, not your current live board or a promise that continuing to circle that small shape will stay safe later.

An interior segment creates a different case

Now consider a six-segment body from head to tail: (3,3), (3,2), (2,2), (2,3), (2,4), and (3,4), still traveling right with fruit elsewhere. The same upward direction targets (2,3), which is an interior segment. The tail that leaves is (3,4), not the target.

The perpendicular turn therefore hits body that remains in the way. The direction category and head position resemble the four-segment example, but the ordered body is different. Counting only the number of nearby occupied squares or remembering that an upward loop worked before would miss the relevant condition. State the segment order before transferring a tail-entry explanation to another position.

Use the distinction without promising a universal escape

A clearly open route is easier to inspect than a tightly timed path through the current tail position. If you cannot identify the last segment and next destination confidently, do not describe an occupied square as safe merely because some part of the snake moves every step. Walls, remaining interior body, and the vacating tail are three different cases.

Pause when you need to leave; it stops play and hides the board rather than offering a visible frozen analysis view. When continuing, inspect the position that reappears. No example here adds lives, permits crossing a border, or guarantees a high score. The practical conclusion is specific: collision depends on the next resolved step and the segment that leaves, not only on a still picture showing a nearby occupied square.

Frequently asked questions

Does the snake wrap through the edge?

No. A step outside the board is a border collision.

Can the head ever enter an occupied tail square?

The current final tail square can be entered when that tail leaves in the same non-growing step.

Can I enter any body square if I turn sideways?

No. An interior segment that remains there still causes a collision.

Does every step remove the tail?

Eating fruit grows the body, so the update does not free space in the same way as an ordinary step.

Do these examples guarantee the next turn is safe?

No. They establish local transitions under stated body order, heading, and fruit conditions.