21 lines
549 B
Python
Raw Normal View History

from typing import Any, Mapping
from abc import ABC, abstractmethod
2024-11-01 04:12:43 -07:00
from ._task import TaskRunner
class Team(ABC, TaskRunner):
@abstractmethod
async def reset(self) -> None:
"""Reset the team and all its participants to its initial state."""
...
@abstractmethod
async def save_state(self) -> Mapping[str, Any]:
"""Save the current state of the team."""
...
@abstractmethod
async def load_state(self, state: Mapping[str, Any]) -> None:
"""Load the state of the team."""
...