From 3e107c4095e26102b0a4d184e0dc9439d790d0f3 Mon Sep 17 00:00:00 2001 From: Mahdi Esmailiyan Date: Sun, 24 Sep 2023 11:47:22 +0330 Subject: [PATCH] Debug --- main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 04f86c9..c2af655 100644 --- a/main.py +++ b/main.py @@ -194,11 +194,11 @@ def turn(game: Game): if (graph.node[v].troops + graph.node[v].fort_troops) < REQUIRED_BORJ_TROOP: reachable = game.get_reachable(v)['reachable'] reachable.sort(key=lambda v: [-int(graph.node[v].is_strategic), graph.node[v].troops], reverse=True) - for u in reachable: - if graph.node[v].troops - graph.node[u].troops > 2: - print(game.move_troop(v, u, (graph.node[v].troops - graph.node[u].troops)//2)) - move = True - break + for u in reachable: + if graph.node[v].troops - graph.node[u].troops > 2: + print(game.move_troop(v, u, (graph.node[v].troops - graph.node[u].troops)//2)) + move = True + break graph.update(game) game.next_state()