Repository navigation
MVP Complete - #2
Open
Wdifulvio523 wants to merge 2 commits into
Open
Wdifulvio523 wants to merge 2 commits into
Wdifulvio523 wants to merge 2 commits into
Conversation
Code commented
|
|
||
| # Make a new player object that is currently in the 'outside' room. | ||
| p = Player("Bill", room['outside']) | ||
| CRED = '\033[91m' |
| # 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) |
There was a problem hiding this comment.
what if player input is 'h'? or 'x'?
Owner
Author
There was a problem hiding this comment.
yeah I'm working on those issues now!
| if direction == "west" or direction == "w": | ||
| self.currentRoom = self.currentRoom.w_to | ||
| #pickup function takes in an action string | ||
| def pickup(self, action): |
There was a problem hiding this comment.
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?
Owner
Author
There was a problem hiding this comment.
Added prompts to avoid this. Currently, if player tries to pick up an item not present, nothing happens (loop just resets)
| if action == 'd': | ||
| self.items.clear() | ||
| #reverse logic on drop | ||
| def drop(self, action): |
There was a problem hiding this comment.
same with drop. what if I drop an item I don't have?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code commented