2023-06-10 17:39:32 +00:00
|
|
|
from .base import Base
|
|
|
|
|
|
|
|
class Agent(Base):
|
2023-06-18 17:15:51 +00:00
|
|
|
def define(self):
|
|
|
|
self.token: str = None
|
|
|
|
self.credits: int = 0
|
2023-06-10 17:39:32 +00:00
|
|
|
|
|
|
|
def update(self, d):
|
2023-06-10 18:49:50 +00:00
|
|
|
self.seta('credits', d)
|
2023-06-10 17:39:32 +00:00
|
|
|
|
|
|
|
def path(self):
|
|
|
|
return f'{self.symbol}.{self.ext()}'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def ext(self):
|
|
|
|
return 'agt'
|
|
|
|
|
|
|
|
def f(self, detail=1):
|
|
|
|
r = super().f(detail)
|
|
|
|
if detail >2:
|
|
|
|
r += f' c:{self.credits}'
|
|
|
|
return r
|