Repository navigation
Conversation
tryingtokeepup
left a comment
There was a problem hiding this comment.
You did great overall Frulwinn! Good luck with the rest of the challenge, and don't forget to rest before the sprint challenge!
| returns the new room that the player moves to if the move was succesful | ||
| or returns to the current room if the move was not successful | ||
| """ | ||
| def try_direction(direction, current_room): |
There was a problem hiding this comment.
I love this; this is much better than what I could come up with.
|
|
||
| # * Waits for user input and decides what to do. | ||
| #handles multiple words | ||
| s = input("\n> ").lower().split() |
There was a problem hiding this comment.
Hahahha, the lower and the split are genius. The next week we need to do is figure out how to parse those split strings.
| if len(s) == 1: | ||
| #the user passed us a direction | ||
| #grab the first charcter of the first word | ||
| s = s[0][0] |
There was a problem hiding this comment.
I have no idea why you need to do some sort of matrix thingy here, but this is interesting!
| self.name = name | ||
| self.description = description | ||
|
|
||
| def __str__(self): |
There was a problem hiding this comment.
Good job using this __str__ method to hold this information!
| self.description = description | ||
|
|
||
| def __str__(self): | ||
| return f"{self.name}, {self.description}" No newline at end of file |
There was a problem hiding this comment.
Looks great. Now, all you have to do is add the items and stuff!
just created class for room