aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Paquette <pcpaquette@gmail.com>2019-08-06 22:27:52 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-08-06 22:33:55 -0400
commitd5092d3c1306dea4ddebd54c591791903a2c5df4 (patch)
treedd373b940ffcce188b3e3e29448b10ed96c8ca14
parent8857f373932c5493baaf03c948b345dc467f1740 (diff)
Fixed issue with 1v1 maps on Webdip API (map_name not set)
-rw-r--r--diplomacy/integration/webdiplomacy_net/game.py5
1 files 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'])