diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-02 00:11:15 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:45 +0100 |
| commit | 27daf97bb5809baf8993e70bb4aae0f514e1fbc9 (patch) | |
| tree | 61247912239f068ade0f46158026789d0b56db11 | |
| parent | 2694d0660ba1aa511f35f0edc3b20bf0a37f5eba (diff) | |
| download | muhqs-game-27daf97bb5809baf8993e70bb4aae0f514e1fbc9.tar.gz muhqs-game-27daf97bb5809baf8993e70bb4aae0f514e1fbc9.zip | |
fix parsing of wandering ai
| -rw-r--r-- | go/game/ai.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/go/game/ai.go b/go/game/ai.go index 0adce722..38823257 100644 --- a/go/game/ai.go +++ b/go/game/ai.go @@ -64,8 +64,8 @@ func NewUnitAI(s *State, u *Unit) *UnitAI { case "shy": go ai.Execute(ShyAI) case "wandering": - aiDesc := u.Card().getAI() - x, err := strconv.Atoi(strings.Split(u.Card().getAI(), " ")[1]) + aiDesc := u.Card().getCanonicalValues("ai")[0] + x, err := strconv.Atoi(strings.Split(aiDesc, " ")[1]) if err != nil { log.Fatalf("Invalid wandering AI description %s", aiDesc) } |
