change investment keyword

This commit is contained in:
geekan 2023-07-03 13:51:59 +08:00
parent f6955b32b3
commit e66c0cf012
2 changed files with 3 additions and 4 deletions

View file

@ -34,9 +34,8 @@ class SoftwareCompany:
"""Hire roles to cooperate"""
self.environment.add_roles(roles)
def invest(self, money: str):
def invest(self, investment: float):
"""Invest company. raise NoMoneyException when exceed max_budget."""
investment = float(money.strip("$"))
self.investment = investment
self.config.max_budget = investment