Expand description
Headless, deterministic core of the Turnbase engine.
Async-free, UI-free, pure computation: state plus action to new state. See
ARCHITECTURE.md at the workspace root for the design and its rationale.
Structs§
- Active
Players - An ordered, deterministic set of players who owe a decision.
- Pile
- An ordered pile of items with deterministic operations.
- Player
Id - Identifies one seat in a match.
- Player
View - The standard observation produced by
State::view_for: the public zone and the viewer’s own private zone, if any. - Prng
- A small, deterministic pseudo-random generator that lives inside game state.
- State
- State split into a public zone and per-player private zones, plus the match’s random generator.
Enums§
- Error
- Errors returned by the engine’s checked entry points.
Constants§
- MAX_
EFFECTS - Upper bound on effects resolved by one
resolve_effectscall, a guard against a game whose triggers never terminate. A well-formed game resolves in far fewer steps.
Traits§
- Determinize
- Opt-in resampling of hidden information for imperfect-information search.
- Effect
System - A game that resolves effects through a queue.
- Game
- A turn-based game defined as pure functions from state and action to new state.
- Reversible
- Opt-in make/unmake for games where cloning the whole state per search node is too slow (chess-scale branching).
Functions§
- resolve_
effects - Resolves
initialand everything it triggers, applying each effect then enqueuing its follow-ups, in FIFO order. - sample_
chance - Samples one outcome from
game.chance_outcomes(state), weighted by probability, usingrng. ReturnsNoneif there are no outcomes.