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-08-20 15:57:26 +0200
commitbcb3394dbcba288fa18b85c5dbc01da2ed9d72af (patch)
tree5850b27e370f32b7edb67857de02ec04de68261d
parente3378e4f779043ee588c291085ac50afbeb8116e (diff)
downloadmuhqs-game-bcb3394dbcba288fa18b85c5dbc01da2ed9d72af.tar.gz
muhqs-game-bcb3394dbcba288fa18b85c5dbc01da2ed9d72af.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
}