Skip to main content

Module commands

Module commands 

Source
Expand description

step(state, command) -> events — the deterministic transition producer.

This is the propose-then-validate gate in miniature: a Command is a proposal (from the human today; from LLM agents in Phase 5), validation happens here, and only resolved, validated values become events. step never mutates state — callers apply the returned events through the fold.

Enums§

Command
CommandError

Constants§

FIXTURE_STREAM_NS
Tag namespace for per-fixture RNG streams (see rng::derive_stream). Public so the calibration harness (fforge-core/src/bin/calibrate.rs) can derive the exact same per-fixture stream advance_matchday uses without duplicating the constant.

Functions§

player_match_preview
The player’s own fixture for the upcoming matchday, simulated exactly as advance_matchday is about to simulate it (same lineup selection, same seed-derived RNG stream) — a pure query, computed from state and discarded by the caller, that never mutates anything or produces an Event. Because it re-derives from the same inputs advance_matchday consumes, its score can never disagree with what Command::AdvanceMatchday actually records. Live-viewing consumers (fforge-game’s main game loop) call this before executing AdvanceMatchday to render the humble text match view (DESIGN.md §9) for the human’s own match. None if the player’s club has a bye this matchday.
step