Reviewed-on: #1
🚀 Treasure Island
A beginner-friendly Python "Choose Your Own Adventure" text game where your choices decide whether you find the treasure.
📚 Table of Contents
🧭 Overview
You start at a crossroad and pick your way through the story using if / elif / else logic. Answers are lowercased and trimmed, so Left and LEFT work too, and invalid answers are asked again.
crossroad: left or right
right -> Game Over (hole)
left -> lake: wait or swim
swim -> Game Over (trout)
wait -> island: red, yellow or blue door
red -> Game Over (fire)
blue -> Game Over (beasts)
yellow -> You Win!
Only one path wins. Feel free to rewrite the story in src/treasure_island/game.py. It is part of Udemy's 100 Days of Code: The Complete Python Pro Bootcamp and has no runtime dependencies.
The repository holds the game in src/treasure_island/, its tests in tests/, the project documents and the wiki pages in docs/, and the SQA and QC framework in framework/.
📋 Requirements
- Python 3.13 or newer
pytest(only for running the tests)
🛠️ Setup
Create and activate a local virtual environment in the project root:
python -m venv .venv
Activate it:
- Windows (PowerShell):
.venv\Scripts\Activate.ps1 - Windows (cmd):
.venv\Scripts\activate.bat - Git Bash on Windows:
source .venv/Scripts/activate - macOS / Linux:
source .venv/bin/activate
Install the project with the test tools:
pip install -e ".[dev]"
Leave the environment with deactivate.
Optional: copy .env.example to .env and fill in the tokens you need. They are only used for repository maintenance, never to run the game. .env is git-ignored.
▶️ Run
python -m treasure_island
or, after installing:
treasure-island
🧪 Tests
pytest
📄 License
Released under the GNU Affero General Public License v3.0 (AGPL-3.0-or-later).
🔗 Links
📎 Appendix: Project documents
The documents a newcomer needs, in reading order.
| Document | What it tells you |
|---|---|
| AGENTS.md | The rules AI agents follow in this repository |
| Wiki | How to play, install and develop the game |
| Artifact registry | Where each artifact type lives, the next version, the PO language and domain |
| Framework README | The framework this project uses |
| Framework changelog | What changed in each framework release |