LogFAQs > #956346401

LurkerFAQs, Active DB, DB1, DB2, DB3, DB4, DB5, DB6, DB7, Database 8 ( 02.18.2021-09-28-2021 ), DB9, DB10, DB11, DB12, Clear
Topic List
Page List: 1
TopicITT: Learning Python
1337toothbrush
07/22/21 9:48:40 AM
#100:


Alright, so I threw together a quick and dirty structured text adventure. Each room is its own function and the game runs in a loop with a win or loss condition. This allows you to jump back and forth between rooms and adding a room is simply a matter of writing another function and having one of the existing rooms simply "link" to that room by setting the state.

Here is the link: https://ideone.com/xFIwVn (You can see the execution here with sample input under stdin)

and here's the pastebin if you prefer that: https://pastebin.com/SAmvm6Fr

---
... Copied to Clipboard!
Topic List
Page List: 1