diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-02 00:11:15 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-02-02 00:11:15 +0100 |
| commit | 10c1cd46c5346203f05fb13865360422921727be (patch) | |
| tree | 492de3ce428c1c032a1318413c76e8ddf86cec6c /go/game/ai.go | |
| parent | 8b92c4746b2732d4c86c69fe0bbe4af09c1bc2df (diff) | |
| download | muhqs-game-10c1cd46c5346203f05fb13865360422921727be.tar.gz muhqs-game-10c1cd46c5346203f05fb13865360422921727be.zip | |
fix parsing of wandering ai
Diffstat (limited to 'go/game/ai.go')
| -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) } |
