From 63e79a4e0e1db39bb54af22c849756d7fd7b9f57 Mon Sep 17 00:00:00 2001 From: Philip Paquette Date: Wed, 21 Aug 2019 20:13:13 -0400 Subject: [API] Converting '-' to 'R' during retreats phase --- diplomacy/integration/webdiplomacy_net/orders.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'diplomacy/integration/webdiplomacy_net/orders.py') diff --git a/diplomacy/integration/webdiplomacy_net/orders.py b/diplomacy/integration/webdiplomacy_net/orders.py index 60cc86a..afacf03 100644 --- a/diplomacy/integration/webdiplomacy_net/orders.py +++ b/diplomacy/integration/webdiplomacy_net/orders.py @@ -166,6 +166,11 @@ class Order(): :type game: diplomacy.Game """ # pylint: disable=too-many-return-statements,too-many-branches,too-many-statements + # Converting move to retreat during retreat phase + if self.phase_type == 'R': + order = order.replace(' - ', ' R ') + + # Splitting into parts words = order.split() # --- Wait / Waive --- -- cgit v1.2.3