-
Notifications
You must be signed in to change notification settings - Fork 696
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
a bit like knights... test passed #615
base: master
Are you sure you want to change the base?
Conversation
app/data.py
Outdated
class Data: | ||
data = None | ||
|
||
@staticmethod | ||
def load_config(filename: json) -> dict: | ||
with open(filename, "r") as file: | ||
info = json.load(file) | ||
return info |
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.
Why you need a class for this?
You have only one method which is anyway static
app/customer.py
Outdated
x, y = self.location | ||
x1, y1 = shop.location |
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.
not good names for variables)
app/customer.py
Outdated
self.name = data.get("name") | ||
self.product_cart = data.get("product_cart") | ||
self.location = data.get("location") | ||
self.money = data.get("money") |
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.
Convet it to Decimal
app/main.py
Outdated
for customer in Customer.group_customers: | ||
print(f"{customer.name} has {customer.money} dollars") | ||
|
||
shop_choice = [None, float("inf")] |
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.
Why you need a list here?
You just use it everywhere like two separate components
No description provided.