A LITTLE GAME. A FIRST STEP INTO CODE.
One cookie.
One night shift.
Clean the roof. Outsmart your own crumbs.
See what a line of code can do.
Clock in, Orio.
Then sweep the crumb you drop there. The tile labels always show your exact position.
THE ACTION
orio.walk(night, 1)Walk asks whether the next tile is open, then moves Orio one tile.
A COMPLETE TURN
- The worker acts.
- The mouse moves toward visible mess.
- The clock advances by one.
- Check success, then sunrise.
The book uses Python. This browser demo reproduces those rules in JavaScript on a shorter roof.
LEARN THE RHYTHM
Move. Notice.
Try again.
You win when the roof is clean and Orio is on tile 12. Reset whenever you like.
- 01
Every third move drops a crumb.
Walk, back and hop count as moves if they succeed. Sweep clears one piece on your tile. Two pieces need two sweeps.
- 02
Hop over the chimney.
The chimney is on 5. From 4, hop exactly two tiles to 6. A blocked action still uses a turn.
- 03
The mouse gets a turn too.
It sees mess up to four tiles away. When it reaches some, it leaves one extra piece and disappears. It cannot step onto Orio.
FROM THE BOOK TO YOUR SCREEN
Keep experimenting.
I Read Code: Orio’s Night Shift has 60 Python puzzles, picture guides, worked examples and full answers. By Lareine Han.
These free files include the full three-roof Python game, 12 ready-to-run examples and a small strategy experiment. The full game has an 80-turn deadline.
Download companion code ZIPTake this demo offline