Text adventures - Task Three - Adventurelib
Adventurelib
Writing your own parser is tedious. You will soon find it has hundreds of if
statements.
So we are going to use a library called Adventurelib which provides a parser for us.
Level 1
Watch this video:
-
Chose a place you know well, e.g. your house or your school. On a sheet of paper, draw a map of this place.
-
Load
game2.py
into Mu. -
Add at least 5 more rooms from your map to the program. (You can change the bedroom and hallway to different rooms too.)
Level 2
Watch this video:
-
Add some more pairs of directions to the game, e.g. up and down, northeast and southwest, in and out.
-
Add at least 5 more rooms to your game.
Level 3
-
Add another command to your game, e.g. “sleep”.
-
Add at least 5 more rooms to your game. Make sure you use some of the new directions you added.