GAME LAB / STATE, COORDINATES & CONDITIONS
Tony’s Exit
Plan a route. Find Tony. Bring him home.
THE SERVICE ANNEX5 ROWS × 6 COLUMNS
S start · T Tony · E exit · # wall · . floor
Read the map as text
S..#.. ##.#.. ...T.. .####. .....E
Rows increase downwards; columns increase to the right. Start at column 0, row 0.
Think a few moves ahead.
Visit Tony at T, then finish at E. Use N, E, S and W. Each letter moves one square. Walls and map edges stop the route.
Every attempt starts at S. There’s no countdown.
Need a route to study?
Try EESSEEESS. Trace each move and explain where the program remembers finding Tony.
Make the Python version yours.
The book walks through this game, line by line. Download the standalone Python file, run it in Python 3 and change one rule.