unifomise tiebreak icons + refacto presenter
This commit is contained in:
parent
0081e52e9a
commit
3d0d7874e3
10 changed files with 185 additions and 165 deletions
|
|
@ -5,6 +5,7 @@ from typing import Any, Dict, List, TYPE_CHECKING
|
|||
if TYPE_CHECKING:
|
||||
from warchron.model.campaign import Campaign
|
||||
from warchron.model.war import War
|
||||
from warchron.constants import ContextType
|
||||
from warchron.model.exception import (
|
||||
ForbiddenOperation,
|
||||
DomainError,
|
||||
|
|
@ -192,7 +193,7 @@ class Round:
|
|||
victory_condition: str | None,
|
||||
comment: str | None,
|
||||
) -> None:
|
||||
from warchron.model.pairing import Pairing
|
||||
from warchron.model.tie_manager import TieResolver
|
||||
|
||||
if self.is_over:
|
||||
raise ForbiddenOperation("Can't update battle in a closed round.")
|
||||
|
|
@ -226,8 +227,9 @@ class Round:
|
|||
if (
|
||||
player
|
||||
and self.has_choice_with_participant(player)
|
||||
and Pairing.participant_spent_token(
|
||||
and TieResolver.participant_spent_token(
|
||||
self.war,
|
||||
ContextType.CHOICE,
|
||||
self.id,
|
||||
sector_id,
|
||||
self.campaign.campaign_to_war_part_id(player),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue