Skip to content
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

Pine - Victoria Duke #79

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

VictoriaDuke
Copy link

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

I like the small regular commits you made with git as you went through the project. Very meaningful commit messages as well.

Nice work Victoria, you hit the learning goals here. All the functions are readable and work well. Well done.

pass
from swap_meet.item import Item

class Clothing(Item):

Choose a reason for hiding this comment

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

👍

pass
from swap_meet.item import Item

class Decor(Item):

Choose a reason for hiding this comment

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

👍

pass
from swap_meet.item import Item

class Electronics(Item):

Choose a reason for hiding this comment

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

👍

@@ -1,2 +1,24 @@
class Item:

Choose a reason for hiding this comment

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

👍

class Vendor:
pass
def __init__(self, inventory=None):

Choose a reason for hiding this comment

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

👍

self.inventory.remove(item)
return item

def get_by_category(self, category=""):

Choose a reason for hiding this comment

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

👍

items.append(item)
return items

def swap_items(self, their_vendor, my_item, their_item):

Choose a reason for hiding this comment

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

👍

their_vendor.add(my_item)
return True

def swap_first_item(self, their_vendor):

Choose a reason for hiding this comment

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

Good reuse of swap_items

their_first_item = their_vendor.inventory[0]
return self.swap_items(their_vendor, my_first_item, their_first_item)

def get_best_by_category(self, category):

Choose a reason for hiding this comment

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

👍 Why not use get_by_category here?

Copy link
Author

Choose a reason for hiding this comment

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

Oh I meant to! I think I got distracted by a different part and didn't come back to this.

best_item = item
return best_item

def swap_best_by_category(self, other, my_priority, their_priority):

Choose a reason for hiding this comment

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

👍 Good reuse of get_best_by_category and swap_items

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