GOAL: Creating an interactive story where the user chooses between crossroads to determine their fate
SYNPOSIS: Individual Project | Winter 2018 | Python
KEY SKILLS: Graphs, dictionary | User input | Nested while loops | Parsing text file
Key Process:
- Parse the text file to create a graph representing the choices the user has at each stage
- Set the first crossroad the user has to choose between to be the current position in the graph
- Depending on the letter the user inputs, reassign the current position in the graph to be the next crossroad in the user’s route chosen
- Continue reassigning the current position until the story comes to an end, represented by the fact that there are no more crossroads (aka: the node has no adjacent vertices)
- Ask the user if they want to play again. If the user says yes, reassign the current position to be the first crossroad (aka: the start vertex). If the user says no, break out of the outer while loop using a boolean and end the program