Skip to main content

AutobalancePlan

Struct AutobalancePlan 

Source
#[non_exhaustive]
pub struct AutobalancePlan { pub title: String, pub entrants: Vec<(String, Option<String>)>, pub groups: BTreeMap<String, Vec<String>>, pub default_entrants: Vec<String>, pub checks: PlaytestChecks, pub stage: Box<dyn TunableStage>, }
Expand description

What autobalance searches on one of the game’s stages (GameTools::autobalance_plan): who plays it and how they are judged, as a PlaytestPlan says, and the stage it may change, its type the game’s (Tunable). The command picks the entrants asked for and runs the search (shuyi_core::autobalance_by), each setting’s tries played on every core and judged once. Build it with AutobalancePlan::new and assign the rest (ADR-0039).

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§title: String

Shown at the top of the answer: 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: PlaytestChecks

The checks over the entrants that play, given their names: the bands the search lands them in.

§stage: Box<dyn TunableStage>

The stage as authored, its knobs, how a try is played on a changed stage and how one is written: most simply a boxed Tunable.

Implementations§

Source§

impl AutobalancePlan

Source

pub fn new( title: impl Into<String>, entrants: Vec<(String, Option<String>)>, checks: PlaytestChecks, stage: Box<dyn TunableStage>, ) -> Self

The plan titled title: entrants judged by checks on stage. It has no groups, and every entrant plays unless --entrant says (default_entrants empty).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.