From 5df0da9668804906cda2b695ca88acf218c86014 Mon Sep 17 00:00:00 2001 From: Philip Paquette Date: Mon, 10 Jun 2019 10:07:10 -0400 Subject: Deprecated usage of NMR in game.py --- diplomacy/engine/game.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'diplomacy/engine') diff --git a/diplomacy/engine/game.py b/diplomacy/engine/game.py index dd5b7a4..be892f9 100644 --- a/diplomacy/engine/game.py +++ b/diplomacy/engine/game.py @@ -2931,7 +2931,7 @@ class Game(Jsonable): A LON H, F IRI - MAO, A IRI - MAO VIA, A WAL S F LON, A WAL S F MAO - IRI, F NWG C A NWY - EDI A IRO R MAO, A IRO D, A LON B, F LIV B """ - cur_power, had_orders, has_orders, powers = power, [], [], [] + cur_power, has_orders, powers = power, [], [] # For each order for line in orders: @@ -2942,26 +2942,8 @@ class Game(Jsonable): if not word: continue - # Checking if the power can order - if not hasattr(who, 'orders'): - return self.error.append('%s HAS NO UNITS OF ITS OWN TO ORDER' % who.name) - - # NMR = No Moves Received (NMR or CLEAR command) - nmr = (len(word) == 1 - and word[0][word[0][:1] in '([':len(word[0]) - (word[0][-1:] in '])')].upper() in ('NMR', 'CLEAR')) if who not in powers: - - # Empty orders before sticking any new orders in it. - had_orders += [who.orders] powers += [who] - if nmr: - continue - - # If CLEAR or NMR, clear orders - elif nmr: - who.orders = {} - has_orders = [x for x in has_orders if x is not who] - continue # Adds orders if 'NO_CHECK' in self.rules: -- cgit v1.2.3