Phase 4 begins. The automaton is a pure function in the engine — automatonCommand(view) — playing from its own redacted GameView, the same information a human seat receives: hidden hands stay hidden from the clockwork. It ranks simple damage spells, counters what hurts (full shield at 3+, reflection at 4+, blunt at 2+), discards its worst cards by a value order, BFS-pathfinds to enemy treasures and home again, refuses to path through hazards, brawls when there is nothing to steal, and always has a safe fallback; the server's drive loop steps any bot-held seat through the same runCommand path as humans, so bot commands log, persist, replay, and broadcast like anyone's. Hosts seat them pre-start with "⚙ seat an automaton" (Automaton, Automaton II, ... V); bot seats persist as tokenless join lines and restore on boot. Proven three ways: bot-vs-bot engine games conclude across seeds in 8-14 rounds (~100 commands — human-scale), a full four-automaton table finishes, and a live websocket game of human vs. automaton ended with the clockwork carrying two treasures home through a do-nothing opponent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
13 lines
477 B
TypeScript
13 lines
477 B
TypeScript
// @wizwar/engine — pure, deterministic Wiz-War (6th edition) game logic.
|
|
// No I/O, no timers, no network: the server drives it in real time, async
|
|
// mode replays it from stored commands, and AI players call it to evaluate
|
|
// moves. All game data is verified against the owner's physical 6e set.
|
|
|
|
export * from "./rng";
|
|
export * from "./board";
|
|
export * from "./cards";
|
|
export * from "./setups";
|
|
export * from "./game";
|
|
export * from "./view";
|
|
export * from "./automaton";
|