some things work

This commit is contained in:
2023-01-26 14:58:41 +01:00
parent be83cbd988
commit 966db6e5ad
24 changed files with 242 additions and 68 deletions
+24 -5
View File
@@ -13,14 +13,33 @@ class Business(ABC):
"""
self.id=id
self.production=production
self.balance_history=[balance]
self.balance=balance
#Setup Inventory
self.inventory={production["name"]: 0}
for k,v in production["craft"].items():
self.inventory[k]=0
for l in production["prod"]:
for k,v in l.items():
self.inventory[k]=0
pass
def step_business_decisions(self):
def tick(self,step):
self.tick_business_decisions(step)
def tick_business_decisions(self,step):
assert "no business decision method has been created"
pass
def tick_episode(self,episode_count):
"""
Call for resetting for the next episode
"""
self.balance_history.append(self.balance)
self.tick_business_episode(episode_count)
def tick_business_episode(self,episode_count):
"""
Call for resetting for the next episode
"""
assert "no business episode tick method has been created"