Skip to content

Adventure Game MVP - #1

Open
abravebee wants to merge 20 commits into
masterfrom
casey-bee
Open

abravebee wants to merge 20 commits into
masterfrom
casey-bee

Conversation

@abravebee

@abravebee abravebee commented Apr 24, 2019 •

Copy link
Copy Markdown
Owner

@sttbtt

  • Put the Room class in room.py based on what you see in adv.py.
  • Put the Player class in player.py.
  • Create a file called item.py and add an Item class in there.
    • This will be the base class for specialized item types to be declared later.
  • The item should have name and description attributes.
    • Hint: the name should be one word for ease in parsing later.
  • Add the ability to add items to rooms.
  • The Room class should be extended with a list that holds the Items that are currently in that room.
  • Add functionality to the main loop that prints out all the items that are visible to the player when they are in that room.
  • Add capability to add Items to the player's inventory. The inventory can also be a list of items "in" the player, similar to how Items can be in a Room.
  • Add a new type of sentence the parser can understand: two words.
  • Until now, the parser could just understand one sentence form: verb such as "n" or "q". But now we want to add the form: verb object such as "take coins" or "drop sword".
  • Split the entered command and see if it has 1 or 2 words in it to determine if it's the first or second form.
  • Implement support for the verb get followed by an Item name. This will be used to pick up Items.
  • If the user enters get or take followed by an Item name, look at the contents of the current Room to see if the item is there.
  • If it is there, remove it from the Room contents, and add it to the Player contents.
  • If it's not there, print an error message telling the user so.
  • Add an on_take method to Item.
  • Call this method when the Item is picked up by the player.
  • The Item can use this to run additional code when it is picked up.
  • Add an on_drop method to Item. Implement it similar to on_take.
  • Implement support for the verb drop followed by an Item name. This is the opposite of get/take.
  • Add the i and inventory commands that both show a list of items currently carried by the player.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant