[][src]Trait weasel::battle::BattleRules

pub trait BattleRules: Sized + Send {
    type TR: TeamRules<Self>;
    type CR: CharacterRules<Self>;
    type AR: ActorRules<Self>;
    type FR: FightRules<Self>;
    type UR: UserRules<Self>;
    type SR: SpaceRules<Self>;
    type RR: RoundsRules<Self>;
    type ER: EntropyRules;
    type Version: PartialEq + Debug + Clone + Send + Serialize + for<'a> Deserialize<'a>;
    fn team_rules(&self) -> &Self::TR;
fn character_rules(&self) -> &Self::CR;
fn actor_rules(&self) -> &Self::AR;
fn fight_rules(&self) -> &Self::FR;
fn user_rules(&self) -> &Self::UR;
fn space_rules(&mut self) -> Self::SR;
fn rounds_rules(&mut self) -> Self::RR;
fn entropy_rules(&mut self) -> Self::ER;
fn version(&self) -> &Self::Version; }

Contains the set of rules for this battle. It's a trait that uses composition to gather all other subsystem rules in a single place.

All rules must be deterministic, otherwise the consistency of events is not guaranteed.

Associated Types

type TR: TeamRules<Self>

Type defining the TeamRules.

type CR: CharacterRules<Self>

Type defining the CharacterRules.

type AR: ActorRules<Self>

Type defining the ActorRules.

type FR: FightRules<Self>

Type defining the FightRules.

type UR: UserRules<Self>

Type defining the UserRules.

type SR: SpaceRules<Self>

Type defining the SpaceRules.

type RR: RoundsRules<Self>

Type defining the RoundsRules.

type ER: EntropyRules

Type defining the EntropyRules.

type Version: PartialEq + Debug + Clone + Send + Serialize + for<'a> Deserialize<'a>

See Version.

Loading content...

Required methods

fn team_rules(&self) -> &Self::TR

Returns a reference to the team rules.

fn character_rules(&self) -> &Self::CR

Returns a reference to the character rules.

fn actor_rules(&self) -> &Self::AR

Returns a reference to the actor rules.

fn fight_rules(&self) -> &Self::FR

Returns a reference to the fight rules.

fn user_rules(&self) -> &Self::UR

Returns a reference to the user rules.

fn space_rules(&mut self) -> Self::SR

Consumes and returns the space rules.

fn rounds_rules(&mut self) -> Self::RR

Consumes and returns the rounds rules.

fn entropy_rules(&mut self) -> Self::ER

Consumes and returns the entropy rules.

fn version(&self) -> &Self::Version

Returns the version of this battle rules.

Loading content...

Implementors

Loading content...