Snake

Snake is a grid game in which a line of cells moves forward on a fixed clock and you steer it. Eating an apple makes it one cell longer; touching a wall or your own body ends the run. Three boards are offered here — 144, 256 and 400 cells — and four speeds from 5.9 to 16.7 cells a second. Fill every cell and you have won.

Score0Best0Length3Free253Applerow 12, column 12Game#1

New game deals a fresh board at the size and speed you last chose, and the play button beside it is Start, Pause and Resume in turn — Space does the same thing. Turns are queued up to 2 deep, so pressing up and then left inside one tick takes both corners rather than only the second, and the key opposite your heading is ignored instead of feeding you your own neck. The three-dot menu holds today’s shared game, the three boards and the four speeds. Pausing saves the board; nothing else does, because a run changes six to seventeen times a second.

Your statistics · 16 × 16

Played
0
Won
0
Win rate
0%
Streak
0
Best streak
0
Best time
—
Best score
—

A run is recorded when it ends. It counts as a win if the snake reached par for this board — 40 cells, which is 814 points — because filling all 256 is worth 32,890 and almost nobody will ever see it. The best score is kept whether you cleared par or not, and the speed you play at never changes it.

This board

256 cells, the standard board. Thirty apples leave the snake 33 long, 13% of the board, so a run has a genuinely open first half and a crowded second. All 253 apples scores 32,890.

Steady: About 8.3 cells a second. The default here, and the middle of the four. The tick never speeds up as the snake grows. Game #1 fixes every apple draw in advance, so the same moves bring out the same apples on any device — you start 3 long and the first apple is worth 4.

Keyboard

Arrows
Turn — queued, so two turns can be pressed inside one tick
W A S D
The same four turns
Space or P
Start, pause, resume
N
New game
F
Full screen
Boards
12 × 12, 16 × 16, 20 × 20
Speeds
5.9 – 16.7 cells/sec
Starting length
3 cells
Perfect game
10,434 – 80,194 points

What are the rules of snake?

  • The snake moves one cell forward every tick, on its own, whether or not you touch anything.
  • You may turn left, right or carry straight on. The direction opposite your heading is refused, never obeyed.
  • Eating the apple adds one cell to the tail and puts a new apple on a cell the snake is not occupying.
  • Leaving the board ends the run. There is no wrap-around here — the four edges are walls.
  • Touching your own body ends the run, with one exception: the cell your tail is leaving this tick is already empty, so following your own tail is legal.
  • Filling every cell on the board is a win. There is nowhere left to put an apple, and that is the end of the game rather than a crash.

Why do two quick presses lose a turn in most snake games?

Because a turn is usually written straight into the snake's heading, and a second press inside the same tick overwrites the first. At the Steady clock a tick is 120 milliseconds and at Blitz it is 60; any two presses closer together than that land inside one tick. Take a corner with up-then-left and the snake goes only left, into the thing you were steering round.

Here a turn is put in a queue two deep and the clock takes one entry per tick. Press up then left inside a single tick and the snake goes up, then left: both corners, in the order you asked for them. Two is deliberate — a queue three or four deep starts executing a plan you have stopped watching, and a press that arrives with the queue already full is refused rather than allowed to displace one you have already committed to.

Can you actually finish a snake game?

Yes, and the win is not theoretical. Every board here has an even number of rows, and an even grid always contains a closed tour that visits each cell exactly once. A snake that simply follows that tour can never meet itself, because its body is always a run of consecutive cells along the tour — so it eats every apple in turn and ends up as long as the board. On the 12 × 12 board that takes fewer than 6,000 ticks, which is about twelve minutes at the Steady clock.

What a full board is worth
BoardCellsApples neededPerfect score
12 × 1214414110,434
16 × 1625625332,890
20 × 2040039780,194

Following the tour is a proof, not advice: it is also the slowest possible way to play, since it walks the whole board between apples. Real play cuts corners, and the moment you cut one you can trap yourself. That gap between what is provably possible and what is actually survivable is the entire game.

How is the score worked out?

An apple is worth the length of the snake that swallowed it. The first is worth 4 points, because the snake starts 3 long and the apple makes it 4; the last one on the 20 × 20 board — the 397th, which fills the four-hundredth cell — is worth 400. That is the whole scoring rule, and it prices the game honestly: the last apple on a crowded board is the hard one, and a flat ten points each would rate it exactly like the first.

Score at a given length
LengthApples eatenScore
300
10749
3027459
50471,269
100975,044

Because the score follows from the length alone, it is also tamper-evident: a saved game whose score and snake disagree is thrown away rather than restored, so a hand-edited file cannot write a record into the statistics panel. The speed you choose is kept out of the score entirely, which is what makes a best score on a board comparable however fast you set the clock.

Does the snake get faster as it grows?

Not here. Plenty of versions shorten the interval as the snake grows, which sounds like rising tension and plays like a countdown: the player who is doing best is punished hardest, and every game ends at roughly the same wall-clock moment whatever they do. The tick you pick at the start is the tick on the last apple.

The four clocks
SpeedTickCells per second
Calm170 ms5.9
Steady120 ms8.3
Quick85 ms11.8
Blitz60 ms16.7

The snake also starts a third of the way across the board rather than in the middle of it, which gives seven cells of runway on the 12 × 12 board before the right-hand wall instead of five. At the Blitz clock five cells is 300 milliseconds to make a first decision, which is not a decision. The clock does not start at all until your first turn.

Where does the apple appear?

On one of the free cells, chosen with a single draw over the list of them — never by picking a random square and trying again if the snake is on it. On an almost-full board that retry loop is a disaster: with one cell free in four hundred it expects four hundred attempts and has no upper bound at all, so the game stutters exactly when it matters most. Drawing from the free list costs the same at every length, and it makes the endgame honest, because a board with no free cells is a win rather than an infinite loop.

Every draw is a pure function of the game number and the count of apples already eaten, so game #914 plays out identically on every device: the same opening board, and then the same apple after the same moves, forever, with nothing stored on a server. Where the apple lands does depend on your snake — it is drawn from the cells you are not standing on — which is why two people on game #914 who have played differently can see the same draw land in different places. The first 30,000 game numbers open on 30,000 different runs, so the number on the status bar is a real identity and not decoration — replay it from the end card and the board comes back exactly as it was dealt.

How do you get better at snake?

  • Stay on the outside earlyRunning the perimeter costs a few ticks per apple and keeps the middle of the board empty, which is where you will need room later. A snake that wanders through the centre while it is still short has cut the open space into two pieces for no gain at all.
  • Never cut the board in twoThe fatal mistake is not hitting yourself; it is sealing off a region with the apple on the wrong side of the wall you just built. Before committing to a line across open space, look at what is left on each side of it and ask whether you can still reach both.
  • Follow your own tail when you are stuckThe cell your tail is leaving is empty by the time your head could reach it, so a loop that chases the tail is always survivable and can be held indefinitely. It buys nothing by itself, but it converts a panic into time to see where the next apple actually is.
  • Plan the exit before the entryApproach an apple from the side that leaves you an open direction afterwards. Eating from a dead end works once and then you are one cell longer in a pocket with a single way out, which is the usual way a promising run ends.
  • Bank the corner in one motionBecause turns are queued two deep, up-then-left is a single instruction here rather than a race against the tick. Press both keys as one movement and the snake takes the corner exactly as you drew it, which is much more reliable than waiting for the first turn to land.
  • On a crowded board, take the long wayOnce the snake covers a third of the cells, sweeping the board in rows costs more ticks but leaves the free space in one connected piece. Short cuts are what leave a scatter of one-cell holes that nothing can ever fill again.

Snake questions people ask

Can the snake turn back on itself and die?
No. Pressing the direction opposite your heading is ignored, not obeyed — and it is measured against the last turn you have queued rather than the direction you are currently travelling, which is the version that still kills you. With up already banked, down is the reversal even though you are heading right.
Can the apple appear underneath the snake?
Never. Each apple is drawn from the list of cells the snake is not occupying, so there is no case where one lands under the body and no case where the game spins trying to find a spot. When that list is empty the snake has filled the board and won.
Does the speed I choose change my score?
No. An apple is worth the length of the snake that ate it and nothing else, so a score on the 16 × 16 board means the same thing at Calm as at Blitz. The best score is kept per board, because 144 cells cap at 10,434 points and 400 cells at 80,194 and the two are not comparable.
Is the game saved if I stop halfway through?
It is saved when you pause, and pausing happens automatically if you switch away from the tab. It is not saved on every tick: a run changes six to seventeen times a second and writing all of that to your browser's storage would be hundreds of writes a minute for a file nobody reads.
What happens if the snake fills the whole board?
You win. There are no free cells left, so no apple is placed, and the game ends on the banner rather than crashing or hanging. It is worth 10,434 points on the small board, 32,890 on the medium and 80,194 on the large.
Do the walls wrap around to the other side?
No. All four edges are solid, and stepping off the board ends the run. A wrapping board is a different game with different tactics — the corners stop being traps and hugging an edge stops being safe.

The rules in six lines

  1. 1The snake moves on its ownOne cell forward every tick, in whichever direction it is heading. You never make it move; you only decide where it turns, and doing nothing is a decision too.
  2. 2Turn with the arrows, WASD, the pad or a swipeTurns are queued up to two deep, so pressing up and then left inside a single tick takes both corners in that order rather than throwing the first one away.
  3. 3You cannot turn back on yourselfThe direction opposite your heading is refused. It is the one key that would put the head on its own neck, and a game that obeyed it would be killing you for a mistyped finger.
  4. 4Eat the apple to growThe head moves onto the apple, the tail stays where it is, and the snake is one cell longer. A new apple appears on a cell the snake is not occupying.
  5. 5The walls are solidStepping off any of the four edges ends the run. There is no wrap-around, so the corners are the most dangerous cells on the board and the edges are only safe in one direction.
  6. 6Your body is solid, except the tail you are leavingTouching any cell of the snake ends the run — but the cell the tail vacates this tick is already empty by the time the head arrives, so chasing your own tail round a tight loop is legal and always has been.
  7. 7Fill the board to winWhen the snake occupies every cell there is nowhere to put an apple, and that is the win. It needs 141 apples on the small board, 253 on the medium and 397 on the large.

The long version, with worked examples and the questions beginners actually ask, is on how to play snake.

Put Snake on your own site

The board runs in an iframe with no tracking, no cookies and no sign-up. Paste this wherever you want it. See all the embeddable games for the rest.

<iframe src="https://www.cardgamenook.com/embed/snake" width="100%" height="620" style="border:0;border-radius:10px;max-width:900px" title="Snake — free online" loading="lazy"></iframe>
<p style="font:14px system-ui;margin:6px 0 0"><a href="https://www.cardgamenook.com/snake">Play Snake</a> at Card Game Nook</p>