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:


  1. Chose a place you know well, e.g. your house or your school. On a sheet of paper, draw a map of this place.

  2. Load game2.py into Mu.

  3. 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:


  1. Add some more pairs of directions to the game, e.g. up and down, northeast and southwest, in and out.

  2. Add at least 5 more rooms to your game.

Level 3

  1. Add another command to your game, e.g. “sleep”.

  2. Add at least 5 more rooms to your game. Make sure you use some of the new directions you added.