Skip to content

initial PR for game - #1

Open
Frulwinn wants to merge 4 commits into
masterfrom
Frulwinn
Open

Frulwinn wants to merge 4 commits into
masterfrom
Frulwinn

Conversation

@Frulwinn

Copy link
Copy Markdown
Owner

just created class for room

@tryingtokeepup
tryingtokeepup self-requested a review June 13, 2019 21:20

@tryingtokeepup tryingtokeepup left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You did great overall Frulwinn! Good luck with the rest of the challenge, and don't forget to rest before the sprint challenge!

Comment thread src/adv.py
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):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I love this; this is much better than what I could come up with.

Comment thread src/adv.py

# * Waits for user input and decides what to do.
#handles multiple words
s = input("\n> ").lower().split()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hahahha, the lower and the split are genius. The next week we need to do is figure out how to parse those split strings.

Comment thread src/adv.py
if len(s) == 1:
#the user passed us a direction
#grab the first charcter of the first word
s = s[0][0]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I have no idea why you need to do some sort of matrix thingy here, but this is interesting!

Comment thread src/item.py
self.name = name
self.description = description

def __str__(self):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good job using this __str__ method to hold this information!

Comment thread src/room.py
self.description = description

def __str__(self):
return f"{self.name}, {self.description}" No newline at end of file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great. Now, all you have to do is add the items and stuff!

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