#[non_exhaustive]pub struct PlaytestPlan {
pub title: String,
pub entrants: Vec<(String, Option<String>)>,
pub groups: BTreeMap<String, Vec<String>>,
pub default_entrants: Vec<String>,
pub checks: PlaytestChecks,
pub play: PlayTry,
pub summary: Vec<Vec<Summary>>,
}Expand description
What playtest plays on one of the game’s stages
(GameTools::playtest_plan): its entrants, its checks, and how one
try is played. The command picks the entrants asked for, plays their
tries on every core, times them and judges them once. Build it with
PlaytestPlan::new and assign the rest (ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.title: StringShown at the top of the report: the stage and its tier, say.
entrants: Vec<(String, Option<String>)>Every entrant, in report order: its name and a label (a mode), if any.
groups: BTreeMap<String, Vec<String>>Named groups of entrants ("all"), which --entrant takes too.
default_entrants: Vec<String>The entrants that play when --entrant isn’t given (all of them
if empty).
checks: PlaytestChecksThe checks over the entrants that play, given their names: a check naming an entrant who doesn’t play is left out. None at all is a plain bot run: nothing is judged, and it passes when every try played.
play: PlayTryOne try: of the entrant at that index of
entrants, from that seed, stopped at that turn
if it hasn’t ended, with the commands applied and its record for
replay, if the game keeps one. Tries run on several threads at
once, in any order; most simply
play_try.
summary: Vec<Vec<Summary>>Each entrant’s summary items, in entrants
order, printed on its line: won 83/100 · turns median 12. An
entrant past the end, or with none, has no summary.
Implementations§
Source§impl PlaytestPlan
impl PlaytestPlan
Sourcepub fn new(
title: impl Into<String>,
entrants: Vec<(String, Option<String>)>,
checks: PlaytestChecks,
play: PlayTry,
) -> Self
pub fn new( title: impl Into<String>, entrants: Vec<(String, Option<String>)>, checks: PlaytestChecks, play: PlayTry, ) -> Self
The plan titled title: entrants judged by checks, a try played
by play. It has no groups and no
summary, and every entrant plays unless
--entrant says (default_entrants
empty).