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

This commit is contained in:
2026-08-19 01:39:39 +03:00
parent b78081d999
commit 0730d8180b
+6 -7
View File
@@ -32,13 +32,12 @@ class SessionState:
return len(self._guesser_moves)
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
elif index == current_index:
if self._step_state == StepState.WAITING_FOR_GUESSER:
elif index == completed:
if self._local_player.role == PlayerRole.SETTER:
return CardState.SETTER_REVEALED
else:
@@ -47,12 +46,12 @@ class SessionState:
return CardState.SETTER_REVEALED
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
elif index == completed_move_count:
elif index == completed:
if self._step_state == StepState.WAITING_FOR_GUESSER:
return CardState.GUESSER_WAITING
else: