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

C17 Whales Morgan Adkisson #91

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

Conversation

MorganAdkisson
Copy link

No description provided.

…assing all tests in waves 01 and 02, finsihed wave assertions
…, create Vendor method swap_item, and passed all tests

in wave 03... refactored swap_items from nested if statements for Vendor and other Vendor to one if statement using 'and'
…tances, was able to pass all wave 05 tests except for test_items_have_condition_as_float - program stalling when it gets to this test
…. Also made a temporary fix to Item class issue that was causing a stall in wave 05 tests (changed while loop). Still needs refactoring.
… and swap_newest_by_category, created new test folder test_optional_enhancement to test additions
…ning - the ussue was the use of mutable list as default inventory parameter
Copy link

@kaidamasaki kaidamasaki 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!

I left a couple of notes but everything looks good!

Well done!

Comment on lines +4 to +8
def __init__(self, category="Clothing", condition=0.0, age=None):
self.category = category
self.condition = condition
self.age = age

Choose a reason for hiding this comment

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

category probably shouldn't be a parameter here since we don't want it to differ for different instances:

Suggested change
"""A child class of Item, representing aspects of an Item specific to Clothing"""
def __init__(self, category="Clothing", condition=0.0, age=None):
self.category = category
self.condition = condition
self.age = age
"""A child class of Item, representing aspects of an Item specific to Clothing"""
def __init__(self, condition=0.0, age=None):
self.category= "Clothing"
self.condition = condition
self.age = age

Comment on lines +13 to +20
0: 'You should probably pass on this one...',
1: 'Poor',
2: 'Meh',
3: 'Good',
4: 'Great',
5: 'Brand spankin new'
}

Choose a reason for hiding this comment

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

Using a dictionary for this is really clean. 😃

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