mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
40 lines
790 B
Python
40 lines
790 B
Python
from __future__ import annotations
|
|
|
|
from abc import ABC, abstractmethod
|
|
from typing import Optional, TYPE_CHECKING, Iterator
|
|
|
|
if TYPE_CHECKING:
|
|
from game.squadrons import Pilot, Squadron
|
|
|
|
|
|
class IFlightRoster(ABC):
|
|
@abstractmethod
|
|
def iter_pilots(self) -> Iterator[Pilot | None]:
|
|
...
|
|
|
|
@abstractmethod
|
|
def pilot_at(self, idx: int) -> Pilot | None:
|
|
...
|
|
|
|
@property
|
|
@abstractmethod
|
|
def squadron(self) -> Squadron:
|
|
...
|
|
|
|
@property
|
|
@abstractmethod
|
|
def max_size(self) -> int:
|
|
...
|
|
|
|
@abstractmethod
|
|
def resize(self, new_size: int) -> None:
|
|
...
|
|
|
|
@abstractmethod
|
|
def set_pilot(self, index: int, pilot: Optional[Pilot]) -> None:
|
|
...
|
|
|
|
@abstractmethod
|
|
def clear(self) -> None:
|
|
...
|