fix: корректное определение текущего индекса в методах возврата состояния карт
This commit is contained in:
@@ -93,7 +93,7 @@ class SessionStateMachine:
|
|||||||
return self._get_guesser_card_state(player, index)
|
return self._get_guesser_card_state(player, index)
|
||||||
|
|
||||||
def _get_setter_card_state(self, index: int) -> CardState:
|
def _get_setter_card_state(self, index: int) -> CardState:
|
||||||
current_index = self.get_setter_step_number() - 1
|
current_index = self.current_index
|
||||||
|
|
||||||
if index > current_index:
|
if index > current_index:
|
||||||
return CardState.SETTER_NOT_SET
|
return CardState.SETTER_NOT_SET
|
||||||
@@ -127,7 +127,7 @@ class SessionStateMachine:
|
|||||||
else:
|
else:
|
||||||
return CardState.GUESSER_WRONG
|
return CardState.GUESSER_WRONG
|
||||||
|
|
||||||
current_index = self.get_guesser_step_number(player) - 1
|
current_index = self.current_index
|
||||||
|
|
||||||
if index > current_index:
|
if index > current_index:
|
||||||
return CardState.GUESSER_DISABLED
|
return CardState.GUESSER_DISABLED
|
||||||
|
|||||||
Reference in New Issue
Block a user