2024-12-04 16:14:41 -08:00
|
|
|
from typing import Any, Mapping, Protocol
|
2024-10-24 05:36:33 -07:00
|
|
|
|
2024-11-01 04:12:43 -07:00
|
|
|
from ._task import TaskRunner
|
2024-10-24 05:36:33 -07:00
|
|
|
|
|
|
|
|
|
|
|
class Team(TaskRunner, Protocol):
|
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
|
|
|
|
|
|
|
async def save_state(self) -> Mapping[str, Any]:
|
|
|
|
"""Save the current state of the team."""
|
|
|
|
...
|
|
|
|
|
|
|
|
async def load_state(self, state: Mapping[str, Any]) -> None:
|
|
|
|
"""Load the state of the team."""
|
|
|
|
...
|