i think it is working

This commit is contained in:
2023-01-23 11:28:12 +01:00
parent 3a421ceb34
commit 89dc8ed54a
22 changed files with 540 additions and 28 deletions
+14 -2
View File
@@ -1,5 +1,17 @@
class BaseAgent():
def tick():
import uuid
from abc import ABC
class BaseAgent(ABC):
_bal="balance"
def __init__(self,simulation) -> None:
"""
Base class of an agent.
Simulation: to register tick method at.
"""
self.id=uuid.uuid4()
self.simulation=simulation
simulation.register_tick(self.id,self.tick)
pass
def tick(self):
"""
Tick method for simulation to call to execute selected action
"""