Project 1B — The Adventure Loops
Checkpoint 2 of 3. Open your Project 1A notebook — this project starts from that code, not from scratch. Right now your character makes exactly one decision and the story ends. Today you turn that into a multi-room adventure using a loop, and wrap your repeated actions into functions.
Requirements
- Start from your Project 1A code
- A loop that lets the player move through at least 3 rooms
- A
describe_room(...)function that takes at least one parameter - A choice-handling function — your 1A branching logic, now wrapped in a
def - The adventure should actually end — a fixed number of rooms, or a condition that stops the loop
Aiming higher? The notebook lists Tier 2 and Tier 3 stretch goals — functions that return values the rest of the program actually uses, an early exit with break, and tracking something (like gold) across rooms.
Getting Started
Download the project notebook and paste or rebuild your 1A code into it as your starting point. Save it into your 1_foundations folder in your cloned repo, and commit once you've saved it.
Before you submit: play through the whole adventure at least twice, making different choices each time, and confirm the loop actually stops when it's supposed to.
What's Next
Coming up: 1.7 — Lists & Strings, where your adventure gets an inventory.