mirror of
https://github.com/GoodStartLabs/AI_Diplomacy.git
synced 2026-04-22 16:49:15 +00:00
power name vs power object fix
This commit is contained in:
parent
d15a90ae68
commit
fbda158b2c
1 changed files with 2 additions and 2 deletions
|
|
@ -207,7 +207,7 @@ def get_valid_orders_with_retry(game,
|
||||||
order_part = tokens[2] # e.g. "H" or "S A MAR"
|
order_part = tokens[2] # e.g. "H" or "S A MAR"
|
||||||
|
|
||||||
# Use the internal game validation method
|
# Use the internal game validation method
|
||||||
validity = game._valid_order(power_name, unit, order_part, report=1)
|
validity = game._valid_order(game.powers[power_name], unit, order_part, report=1)
|
||||||
if validity != 1:
|
if validity != 1:
|
||||||
invalid_info.append(
|
invalid_info.append(
|
||||||
f"Order '{move}' returned validity={validity}. (None/-1=invalid, 0=partial, 1=valid)"
|
f"Order '{move}' returned validity={validity}. (None/-1=invalid, 0=partial, 1=valid)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue