You reach your car and leave the woods,
but a memory of old trees, dark shadows and wonder remains.
As you enter a darker region of the woods, you hear the rustling of leaves behind you.
Minutes later, you still don't quite know, how you escaped,
- #: Descriptions for the places in th
ge terrain / maze
+ #: Descriptions for the places in the terrain / maze
self.descriptions = descriptions
#: The function to use for telling stories
self.pos_to_name(directions[i]) for i in answers])
+ # Ask the user until he/she supplies a valid answer.
+ ans = ask(question).strip() # removing any whitespace before the first letter
+ # the users input fits any of the answers
+ # of the name of teh region for that answer,
name = self.maze[directions[i]][directions[i]]
if ans.lower() in [i.lower(), i.lower(), name, " ".join(name.split()[1:])]:
story("""You go to """ + self.pos_to_name(self.position))
-path = Path(start=(2,2), target=(0,0), maze=wood, descriptions=location_descriptions, story=story, ask=ask)
+# Get the path to move in.
+path = Path( start=(2,2), # Where we begin
+ target=(0,0), # Where we want to get
+ maze=wood, # The maze in which we move
+ descriptions=location_descriptions, # Descriptions for the named locations in the maze
+# Move until we reach the target.
while not path.position == path.target: