fix: исправлен порядок открытия карт у загадывающего

This commit is contained in:
2026-08-19 01:39:39 +03:00
parent b78081d999
commit 0730d8180b
+10 -11
View File
@@ -32,27 +32,26 @@ class SessionState:
return len(self._guesser_moves) return len(self._guesser_moves)
def _get_setter_card_state(self, index: int) -> CardState: def _get_setter_card_state(self, index: int) -> CardState:
current_index = len(self._setter_moves) completed = self._completed_move_count
if index > current_index: if index > completed:
return CardState.SETTER_NOT_SET return CardState.SETTER_NOT_SET
elif index == current_index: elif index == completed:
if self._step_state == StepState.WAITING_FOR_GUESSER: if self._local_player.role == PlayerRole.SETTER:
if self._local_player.role == PlayerRole.SETTER: return CardState.SETTER_REVEALED
return CardState.SETTER_REVEALED else:
else: return CardState.SETTER_HIDDEN
return CardState.SETTER_HIDDEN
return CardState.SETTER_REVEALED return CardState.SETTER_REVEALED
def _get_guesser_card_state(self, index: int) -> CardState: def _get_guesser_card_state(self, index: int) -> CardState:
completed_move_count = self._completed_move_count completed = self._completed_move_count
if index > completed_move_count: if index > completed:
return CardState.GUESSER_DISABLED return CardState.GUESSER_DISABLED
elif index == completed_move_count: elif index == completed:
if self._step_state == StepState.WAITING_FOR_GUESSER: if self._step_state == StepState.WAITING_FOR_GUESSER:
return CardState.GUESSER_WAITING return CardState.GUESSER_WAITING
else: else: