-
Notifications
You must be signed in to change notification settings - Fork 71
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
Scissors - Mariela C. #62
base: master
Are you sure you want to change the base?
Conversation
…the respective category
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.
The code looks great! Very readable and thorough!
if self.condition >= 5: | ||
return "BRAND NEW - STRAIGHT OUT OF THE BOX" | ||
elif self.condition >= 4: | ||
return "Looks Brand New" | ||
elif self.condition >= 3: | ||
return "A few imperfections - Nobody's Perfect!" | ||
elif self.condition >= 1: | ||
return "Fairly Used, Easy DIY fix" |
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.
Love these :D
|
||
|
||
# --------------- Wave 3 -------------- | ||
def swap_items(self,friend_vendor,my_item,their_item): |
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.
This all works great! That said, this method would be a good place to make use of the add and remove methods above
else: | ||
first_item = self.inventory[0] | ||
first_friend_item = friend_vendor.inventory[0] | ||
self.swap_items(friend_vendor,first_item,first_friend_item) |
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 that the code makes use of swap_items
here!
def get_best_by_category(self, category): | ||
highest_condition = 0 | ||
quality_item = None | ||
matching_category_items = self.get_by_category(category) |
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 that you used get_by_category
here!
No description provided.