mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
22 lines
615 B
Python
22 lines
615 B
Python
import typing
|
|
|
|
from theater.conflicttheater import *
|
|
from theater.controlpoint import *
|
|
from .event import *
|
|
|
|
class Game:
|
|
events = [] # type: typing.List[Event]
|
|
|
|
def __init__(self, theater: ConflictTheater):
|
|
self.theater = theater
|
|
|
|
def _fill_cap_events(self):
|
|
for cp in [x for x in self.theater.controlpoints if x.captured]:
|
|
for connected_cp in [x for x in cp.connected_points if not x.captured]:
|
|
self.events.append(CaptureEvent(cp, connected_cp))
|
|
|
|
def pass_turn(self):
|
|
self.events = [] # type: typing.List[Event]
|
|
self._fill_cap_events()
|
|
|