-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cheetahs - Emma #86
base: master
Are you sure you want to change the base?
Cheetahs - Emma #86
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this project Emma! The code is very clean and easy to read. Fantastic use of helper methods in the Vendor class! This project is green.
if self.condition == 0: | ||
return "Very Poor" | ||
elif self.condition == 1: | ||
return "Poor" | ||
elif self.condition == 2: | ||
return "Fair" | ||
elif self.condition == 3: | ||
return "Good" | ||
elif self.condition == 4: | ||
return "Very Good" | ||
elif self.condition == 5.0: | ||
return "Exceptional" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conditions can be a float, but this function will only work for whole numbers. If an item has a condition of 3.5, this function will return None
. How could you adapt these conditionals to work for floats?
friend.add(self.inventory.pop(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use swap_items
to simplify the code here?
No description provided.