INVENTORY = re.compile('(?:^i$|.*inventory)', re.IGNORECASE) Each room has a 'description', a list of 'exits' where the player can go next, and a list of 'items' that are in the room. Note that each entry in the map is a key/value pair where the key is the room name and the value is another map describing that room. Not a lot of fanciness here: just a Python dict that keeps track of the rooms in our cave. 'description': 'You made it to the end.', 'down through a metal grate and disappears. ![]() 'description': 'You reach the end of the stream, which flows ' \ 'building and down a gully to the SOUTH.', ![]() 'description': 'You are standing at the end of a road before ' \
0 Comments
Leave a Reply. |