From 2d4330ef74353ee2f3b730e88d232c4f37a2e377 Mon Sep 17 00:00:00 2001 From: consultoria-as Date: Tue, 27 Jan 2026 02:40:20 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20rotaci=C3=B3n=20de=20jugadores=20en=20ro?= =?UTF-8?q?bo=20fallido/pasado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- backend/app/services/game_manager.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/app/services/game_manager.py b/backend/app/services/game_manager.py index 407f3d1..4ab487e 100644 --- a/backend/app/services/game_manager.py +++ b/backend/app/services/game_manager.py @@ -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