aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go/game/ai.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/go/game/ai.go b/go/game/ai.go
index 07440899..abdebba4 100644
--- a/go/game/ai.go
+++ b/go/game/ai.go
@@ -577,7 +577,6 @@ func TargetOrientedAI(ai *UnitAI) {
// If there is no special case for a unit, a rough heuristic is used to determinw the AI.
// Units with full actions are shy and everything else is aggresive.
func SuggestUnitAI(unit *Unit) string {
- log.Println(unit.card.Name)
switch unit.card.Name {
case "King":
return "shy"
@@ -660,6 +659,9 @@ func (ai *SimpleAiControl) handlePriority() Action {
u.tap()
continue
}
+ if a == nil && more {
+ log.Fatal(uAi, "returned a nil action")
+ }
return a
}
}