Browse files

If we have no valid moves, dump all known legions for debugging.

(It's very hard to have no valid moves in Titan, so I suspect
some kind of client/server sync bug.)
  • Loading branch information...
1 parent 36301bf commit 0b961e538f6c1e39aac1cb46fef45fde425eb9d3 @dripton committed Aug 25, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 slugathon/ai/CleverBot.py
View
4 slugathon/ai/CleverBot.py
@@ -461,6 +461,10 @@ def move_legions(self, game):
(score, legion, hexlabel, entry_side))
best_moves.sort()
logging.debug("best moves %s", best_moves)
+ if not best_moves:
+ logging.debug("dumping all legions")
+ for legion in game.all_legions():
+ logging.debug(legion)
if player.can_take_mulligan:
legions_with_good_moves = set()

0 comments on commit 0b961e5

Please sign in to comment.