2025-01-22 15:51:34 -08:00
|
|
|
from typing import Any, Mapping
|
|
|
|
from abc import ABC, abstractmethod
|
2024-11-01 04:12:43 -07:00
|
|
|
from ._task import TaskRunner
|
2024-10-24 05:36:33 -07:00
|
|
|
|
|
|
|
|
2025-01-22 15:51:34 -08:00
|
|
|
class Team(ABC, TaskRunner):
|
|
|
|
@abstractmethod
|
2024-11-07 16:00:35 -08:00
|
|
|
async def reset(self) -> None:
|
|
|
|
"""Reset the team and all its participants to its initial state."""
|
|
|
|
...
|
2024-12-04 16:14:41 -08:00
|
|
|
|
2025-01-22 15:51:34 -08:00
|
|
|
@abstractmethod
|
2024-12-04 16:14:41 -08:00
|
|
|
async def save_state(self) -> Mapping[str, Any]:
|
|
|
|
"""Save the current state of the team."""
|
|
|
|
...
|
|
|
|
|
2025-01-22 15:51:34 -08:00
|
|
|
@abstractmethod
|
2024-12-04 16:14:41 -08:00
|
|
|
async def load_state(self, state: Mapping[str, Any]) -> None:
|
|
|
|
"""Load the state of the team."""
|
|
|
|
...
|