aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-07-21 08:33:41 -0400
committerFlorian Fischer <florian.fischer@muhq.space>2025-07-22 12:54:28 -0400
commit249d9b42ca3b3e6899bc620e30d53f23ec5eaa2a (patch)
treed66019dd746244c25fe7558e7ccec2bf2acb5323
parent6cac8e514d90e3bd8f547952e841f05cb6d09a2e (diff)
downloadmuhqs-game-249d9b42ca3b3e6899bc620e30d53f23ec5eaa2a.tar.gz
muhqs-game-249d9b42ca3b3e6899bc620e30d53f23ec5eaa2a.zip
do not return nil actions
-rw-r--r--go/game/ai.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/go/game/ai.go b/go/game/ai.go
index 35fa19cc..b7d42b0e 100644
--- a/go/game/ai.go
+++ b/go/game/ai.go
@@ -656,10 +656,7 @@ func (ai *SimpleAiControl) handleTargetSelection() Action {
return ctx.Action
}
- err := selectRandomTargets(s.Rand, t)
- if err != nil {
- return nil
- }
+ selectRandomTargets(s.Rand, t)
return ctx.Action
}