from abc import ABC import log class Business(ABC): def __init__(self,id,production,balance,location) -> None: """production (dict): { name: 'Gem', amount: 4, craft: { 'Raw_Gem': 4, 'Tool_Gem': 0.2, } } balance (int): Starting Balance """ self.id=id self.location=location self.production=production self.balance_history=[balance] self.balance=balance self.expense=0 self.income=0 #Setup Inventory self.inventory={production["name"]: 0} for k,v in production["prod"].items(): self.inventory[k]=0 pass 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.tick_business_episode(episode_count) self.balance_history.append(self.balance) def tick_business_episode(self,episode_count): """ Call for resetting for the next episode """ assert "no business episode tick method has been created" def close_business(self): assert "close_business has not been provided"