Skip to content

MVP Complete - #2

Open
Wdifulvio523 wants to merge 2 commits into
masterfrom
william-difulvio-intro-python-ii
Open

Wdifulvio523 wants to merge 2 commits into
masterfrom
william-difulvio-intro-python-ii

Conversation

@Wdifulvio523

Copy link
Copy Markdown
Owner

Code commented

Code commented
Comment thread src/adv.py

# Make a new player object that is currently in the 'outside' room.
p = Player("Bill", room['outside'])
CRED = '\033[91m'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice touch :)

Comment thread src/adv.py
# two possibilities for a player to move
# either one word (n or north) or two words, starting with go (go north, go n)
if player_input != "p" and player_input != "d":
p.move(player_input)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if player input is 'h'? or 'x'?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I'm working on those issues now!

Comment thread src/player.py
if direction == "west" or direction == "w":
self.currentRoom = self.currentRoom.w_to
#pickup function takes in an action string
def pickup(self, action):

@LuisanSuarez LuisanSuarez Feb 14, 2019 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do players get a warning if they try to pick up an item that's not present? what happens if they pick up an item that's not there?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added prompts to avoid this. Currently, if player tries to pick up an item not present, nothing happens (loop just resets)

Comment thread src/player.py
if action == 'd':
self.items.clear()
#reverse logic on drop
def drop(self, action):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with drop. what if I drop an item I don't have?

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.

2 participants