From d5092d3c1306dea4ddebd54c591791903a2c5df4 Mon Sep 17 00:00:00 2001 From: Philip Paquette Date: Tue, 6 Aug 2019 22:27:52 -0400 Subject: Fixed issue with 1v1 maps on Webdip API (map_name not set) --- diplomacy/integration/webdiplomacy_net/game.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/diplomacy/integration/webdiplomacy_net/game.py b/diplomacy/integration/webdiplomacy_net/game.py index 32c425f..0233ea9 100644 --- a/diplomacy/integration/webdiplomacy_net/game.py +++ b/diplomacy/integration/webdiplomacy_net/game.py @@ -250,9 +250,8 @@ def state_dict_to_game_and_power(state_dict, country_id, max_phases=None): state_dict_phases = state_dict_phases[-1 * max_phases:] all_phases = [process_phase_dict(phase_dict, map_id=map_id) for phase_dict in state_dict_phases] - # Building game - Replaying the last 6 phases - game = Game() - game.game_id = game_id + # Building game - Replaying the last phases + game = Game(game_id=game_id, map_name=CACHE['ix_to_map'][map_id]) for phase_to_replay in all_phases[:-1]: game.set_current_phase(phase_to_replay['name']) -- cgit v1.2.3