Skip to content

moin-uddin-intro-to-python-II - #1

Open
Legitcoder wants to merge 14 commits into
masterfrom
moin-uddin
Open

Legitcoder wants to merge 14 commits into
masterfrom
moin-uddin

Conversation

@Legitcoder

Copy link
Copy Markdown
Owner

No description provided.

@tsaihuangsd

Copy link
Copy Markdown
Collaborator

Excellent effort today! I like the titles of your commits a lot; very descriptive. I l also like that you go back and refactor the codes to make them more readable. My only wish is that I can get the invite from you early so I can have early access to the magic you are creating!

Comment thread src/adv.py Outdated
break
elif user_input == 'n':
p.current_room = room[p.place].n_to
p.place = [k for k,v in room.items() if v == room[p.place].n_to][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.

This line and some similar lines below, while very concise, are not very readable, so this would be a great time to use some comments to clarify what is going on.

Comment thread src/adv.py Outdated
user_input = input("What direction do you want to go? ")
try:
if user_input == 'q':
i = 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 am not quite sure what "i" does.... It would help the reader understand better if you use a more descriptive variable name, perhaps?

Comment thread src/adv.py
elif user_input == 'n':
p.current_room = room[p.place].n_to
p.place = [k for k,v in room.items() if v == room[p.place].n_to][0]
p.current_room = p.current_room.n_to

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.

MUCH clearer than before!

@tsaihuangsd

Copy link
Copy Markdown
Collaborator

I think you are ready for tomorrow. Best of luck!

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