diff --git a/data/cat.py b/data/cat.py index 0dfb7f3..b83494a 100644 --- a/data/cat.py +++ b/data/cat.py @@ -1,9 +1,10 @@ class Cat: - def __init__(self, name, traits, money=25, inventory={}): + def __init__(self, name, traits, money=25, inventory=None): self.name = name self.traits = traits self.money = money self.inventory = inventory + self.inventory = inventory if inventory is not None else {} def to_dict(self): return vars(self) diff --git a/systems/world.py b/systems/world.py index d03b7fa..001aba4 100644 --- a/systems/world.py +++ b/systems/world.py @@ -183,8 +183,9 @@ def house(cat: Cat): ): case "Check on your cat": print( - f"{cat.name} - a {cat.traits["size"]} {cat.traits["color"]} with {cat.traits["eyes"]} eyes" + f"{cat.name} - a {cat.traits["size"]} {cat.traits["color"]} with {cat.traits["eyes"]} eyes." ) + print(f"You have ${cat.money}.") case "Pet your cat": pet(cat) case "Feed your cat":