From a42d870221c251bebfd3cc6cc1e1c0d23b9c53b6 Mon Sep 17 00:00:00 2001 From: notoraptor Date: Mon, 26 Aug 2019 13:26:27 -0400 Subject: Use calls to Game parent methods in function to_saved_game_format(). This will help using the function even with derived classes. --- diplomacy/utils/export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'diplomacy/utils') diff --git a/diplomacy/utils/export.py b/diplomacy/utils/export.py index 3a03de1..6c54689 100644 --- a/diplomacy/utils/export.py +++ b/diplomacy/utils/export.py @@ -32,9 +32,9 @@ def to_saved_game_format(game): """ # Get phase history. - phases = game.get_phase_history() + phases = Game.get_phase_history(game) # Add current game phase. - phases.append(game.get_phase_data()) + phases.append(Game.get_phase_data(game)) # Filter rules. rules = [rule for rule in game.rules if rule not in RULES_TO_SKIP] # Extend states fields. -- cgit v1.2.3