Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
esmailiyan committed Sep 24, 2023
1 parent c8079f9 commit 3e107c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3e107c4

Please sign in to comment.