fix: rotación de jugadores en robo fallido/pasado
- Cuando un equipo falla el robo, avanza su índice de jugador - Cuando un equipo pasa el robo, también avanza su índice - El turno vuelve correctamente al equipo original Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -136,6 +136,12 @@ class GameManager:
|
||||
q["answered"] = True
|
||||
break
|
||||
|
||||
# Advance stealing team's player index (they had their turn)
|
||||
team_players = room["teams"][stealing_team]
|
||||
room["current_player_index"][stealing_team] = (
|
||||
room["current_player_index"][stealing_team] + 1
|
||||
) % len(team_players)
|
||||
|
||||
# Original team chooses next
|
||||
room["current_team"] = "B" if stealing_team == "A" else "A"
|
||||
room["current_question"] = None
|
||||
@@ -192,8 +198,15 @@ class GameManager:
|
||||
q["answered"] = True
|
||||
break
|
||||
|
||||
# The team that passed on steal - advance their player index
|
||||
passing_team = room["current_team"]
|
||||
team_players = room["teams"][passing_team]
|
||||
room["current_player_index"][passing_team] = (
|
||||
room["current_player_index"][passing_team] + 1
|
||||
) % len(team_players)
|
||||
|
||||
# Switch back to original team for next selection
|
||||
room["current_team"] = "B" if room["current_team"] == "A" else "A"
|
||||
room["current_team"] = "B" if passing_team == "A" else "A"
|
||||
room["current_question"] = None
|
||||
room["can_steal"] = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user