From 7956e28957848044a0062976eb526f136db8782a Mon Sep 17 00:00:00 2001 From: ezeluduena Date: Sat, 11 Nov 2023 16:03:50 -0300 Subject: [PATCH] =?UTF-8?q?Arreglo=20de=20envio=20de=20mensajes=20al=20jug?= =?UTF-8?q?ar=20seducci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/routers/games/action_functions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/routers/games/action_functions.py b/app/routers/games/action_functions.py index 3c62cbc..b70f061 100644 --- a/app/routers/games/action_functions.py +++ b/app/routers/games/action_functions.py @@ -49,8 +49,8 @@ async def send_players_chagnge_event(game: Game, player_id: int, objective_playe async def send_players_exchagnge_event(game: Game, player_id: int, objective_player_id: int): json_msg = { "event": Events.EXCHANGE_DONE, - "player_id": player_id, - "objective_player_id": objective_player_id + "player_name": get_player_name_by_id(player_id), + "objective_player_name": get_player_name_by_id(objective_player_id) } await player_connections.send_event_to_other_players_in_game(game.name, json_msg, player_id) @@ -186,9 +186,6 @@ def process_card_exchange(game: Game, player: Player, objective_player: Player, objective_player.hand.remove(objective_player_card) objective_player.hand.add(player_card) - asyncio.ensure_future(send_players_exchagnge_event( - game, player.id, objective_player.id)) - @db_session def process_seduction_card(game: Game, player: Player, objective_player: Player, @@ -201,5 +198,8 @@ def process_seduction_card(game: Game, player: Player, objective_player: Player, process_card_exchange(game, player, objective_player, card_to_exchange, random_card) + asyncio.ensure_future(send_players_exchagnge_event( + game, player.id, objective_player.id)) + # asyncio.ensure_future(send_seduction_done_event( # player.id, objective_player.id))