Port the finite state machine from "Programming Game AI by Example" chapter 2: BaseGameEntity, a generic State[T]/StateMachine[T] pair (Go generics standing in for the book's C++ templates), and a Miner that cycles through digging, banking, sleeping, and drinking states. VisitBankAndDepositGold, GoHomeAndSleepTilRested, and QuenchThirst are original implementations based on the book's written behavior description, since their C++ source wasn't available. Includes a runnable demo in main.go.
4 lines
74 B
AMPL
4 lines
74 B
AMPL
module git.jjstudio.me/jonas/Programming-Game-AI-by-Example-Go
|
|
|
|
go 1.25.5
|