Skip to content

Sea Turtles - Shannon B. - swap meet#102

Open
eggoweggo wants to merge 2 commits intoada-c17:masterfrom
eggoweggo:master
Open

Sea Turtles - Shannon B. - swap meet#102
eggoweggo wants to merge 2 commits intoada-c17:masterfrom
eggoweggo:master

Conversation

@eggoweggo
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@tgoslee tgoslee left a comment

Choose a reason for hiding this comment

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

Great job Shannon. I left some comments on what you did well and a few suggestions. Let me know if you have any questions.

Comment thread swap_meet/clothing.py
pass No newline at end of file
from swap_meet.item import Item

class Clothing(Item):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏽

Comment thread swap_meet/decor.py
pass No newline at end of file
from swap_meet.item import Item

class Decor(Item):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏽

Comment thread swap_meet/electronics.py
pass
from swap_meet.item import Item

class Electronics(Item):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏽

Comment thread swap_meet/item.py
def __str__(self):
return "Hello World!"

def condition_description(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good job making an if/elif statement here. I would look into how you could possibly improve this block of code by using other data structures.

Comment thread swap_meet/vendor.py
Comment on lines +5 to +8
if inventory is None:
self.inventory = []
else:
self.inventory = inventory
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

another fun to do it self.inventory = inventory if inventory is not None else []

Comment thread swap_meet/vendor.py
Comment on lines +30 to +33
friend.add(my_item)
self.remove(my_item)
self.add(their_item)
friend.remove(their_item)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great use of the instance methods you created.

Comment thread swap_meet/vendor.py
else:
return False

def swap_first_item(self, friend):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

great job here. You could also use try/except in a few places instead of if/else for your error handling.

Comment thread swap_meet/vendor.py
self.swap_items(friend, self.inventory[0], friend.inventory[0])
return True

def get_best_by_category(self, category=""):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏽

Comment thread swap_meet/vendor.py
best_item = item
return best_item

def swap_best_by_category(self, other, my_priority, their_priority):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍🏽

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