Every function running in that game is one you wrote yourself: the snake itself, the stepping, the walls, the biting, the apples, the scoring, the speed curve and the keyboard.
Now go and play the finished game — 🐍 Snake — or open funtime/lib/ and read the other functions that turn your twelve into a whole game.
Next challenge: make the walls wrap around instead of killing you, add a second apple, or try Build Tetris Yourself.
🎮 The game so far
…
📋 How this works
Each step asks for one function from the real game. The INPUT / OUTPUT / ALGORITHM comment at the top of the editor tells you everything you need — and there is a copy above it you can open any time.
Press ▶ Test it to run real checks on your function. Every ❌ tells you what it expected and what it got.
When all the tests pass, the next step unlocks and the demo switches to your code.
Use 🎬 The goal any time to see what the demo should look like when it works.
Your code is saved in this browser, so you can close the page and come back later.
⚠️ A while loop that never stops is caught after 2 seconds and reported as a mistake — so you can fix it instead of reloading.