feat: westworldwithwoman. add elsa

This commit is contained in:
jonas committed 2026-09-03 21:28:28 +02:00
1 parent 2764849943
commit 0e7482e04c
28 files changed
+1946

No files matched your search

@@ -0,0 +1,24 @@
// Command westworldwithwoman runs the extended demo from the book:
// Miner Bob and his wife Elsa both tick forward together, so you can
// watch their two state machines run side by side, same as the
// book's sample console output.
package main
import (
"fmt"
"git.jjstudio.me/jonas/Programming-Game-AI-by-Example-Go/chapter-2-state-driven-agent-design/westworldwithwoman"
)
func main() {
bob := westworldwithwoman.NewMiner(1)
elsa := westworldwithwoman.NewElsa(2)
const numUpdateSteps = 30
for range numUpdateSteps {
bob.Update()
elsa.Update()
}
fmt.Println()
}