i think it is working
This commit is contained in:
@@ -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
|
||||
"""
|
||||
Reference in New Issue
Block a user