[][src]Struct weasel::battle::Battle

pub struct Battle<R: BattleRules> { /* fields omitted */ }

Represent the in-game world from the point of view of the tactical combat system.

Battle is the core object in weasel, since it contains all entities, teams, the event timeline and all other modules necessary to have a representation of the world.

Implementations

impl<R: BattleRules + 'static> Battle<R>[src]

pub fn builder(rules: R) -> BattleBuilder<R>[src]

Returns a battle builder.

pub fn phase(&self) -> BattlePhase[src]

Returns in which phase is the battle.

pub fn entities(&self) -> &Entities<R>[src]

Returns a reference to the entities manager for this battle.

pub fn entities_mut(&mut self) -> &mut Entities<R>[src]

Returns a mutable reference to the entities manager for this battle.

pub fn history(&self) -> &History<R>[src]

Returns the history of this battle.

pub fn rules(&self) -> &R[src]

Returns a reference to this battle's rules.

pub fn rules_mut(&mut self) -> &mut R[src]

Returns a mutable reference to this battle's rules.

pub fn space(&self) -> &Space<R>[src]

Returns a reference to this battle's space representation.

pub fn space_mut(&mut self) -> &mut Space<R>[src]

Returns a mutable reference to this battle's space representation.

pub fn entropy(&self) -> &Entropy<R>[src]

Returns a reference to the entropy manager for this battle.

pub fn entropy_mut(&mut self) -> &mut Entropy<R>[src]

Returns a mutable reference to the entropy manager for this battle.

pub fn rounds(&self) -> &Rounds<R>[src]

Returns a reference to the rounds manager for this battle.

pub fn rounds_mut(&mut self) -> &mut Rounds<R>[src]

Returns a mutable reference to the rounds manager for this battle.

pub fn metrics(&self) -> ReadMetrics<'_, R>[src]

Returns a handle from which metrics can be read.

pub fn metrics_mut(&mut self) -> WriteMetrics<'_, R>[src]

Returns a handle from which metrics can be modified.

pub fn versioned_events<'a>(
    &'a self,
    range: Range<usize>
) -> impl Iterator<Item = VersionedEventWrapper<R>> + 'a
[src]

Returns an iterator over all history events in a range, versioned.

The range must be valid.

Auto Trait Implementations

impl<R> !RefUnwindSafe for Battle<R>

impl<R> Send for Battle<R> where
    <<R as BattleRules>::AR as ActorRules<R>>::Ability: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send,
    <R as BattleRules>::ER: Send,
    <<R as BattleRules>::ER as EntropyRules>::EntropyModel: Send,
    <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Send,
    <<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Send,
    <<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Send,
    <<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Send,
    <<R as BattleRules>::TR as TeamRules<R>>::Id: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Send,
    <<R as BattleRules>::TR as TeamRules<R>>::Objectives: Send,
    <<R as BattleRules>::SR as SpaceRules<R>>::Position: Send,
    <<R as BattleRules>::TR as TeamRules<R>>::Power: Send,
    <R as BattleRules>::RR: Send,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Send,
    <R as BattleRules>::SR: Send,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceModel: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::Status: Send,
    <<R as BattleRules>::UR as UserRules<R>>::UserMetricId: Send

impl<R> !Sync for Battle<R>

impl<R> Unpin for Battle<R> where
    R: Unpin,
    <<R as BattleRules>::AR as ActorRules<R>>::Ability: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin,
    <R as BattleRules>::ER: Unpin,
    <<R as BattleRules>::ER as EntropyRules>::EntropyModel: Unpin,
    <<<R as BattleRules>::AR as ActorRules<R>>::Ability as Id>::Id: Unpin,
    <<<R as BattleRules>::TR as TeamRules<R>>::Power as Id>::Id: Unpin,
    <<<R as BattleRules>::CR as CharacterRules<R>>::Statistic as Id>::Id: Unpin,
    <<<R as BattleRules>::CR as CharacterRules<R>>::Status as Id>::Id: Unpin,
    <<R as BattleRules>::TR as TeamRules<R>>::Id: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Unpin,
    <<R as BattleRules>::TR as TeamRules<R>>::Objectives: Unpin,
    <<R as BattleRules>::SR as SpaceRules<R>>::Position: Unpin,
    <<R as BattleRules>::TR as TeamRules<R>>::Power: Unpin,
    <R as BattleRules>::RR: Unpin,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Unpin,
    <R as BattleRules>::SR: Unpin,
    <<R as BattleRules>::SR as SpaceRules<R>>::SpaceModel: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::Statistic: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::Status: Unpin,
    <<R as BattleRules>::UR as UserRules<R>>::UserMetricId: Unpin

impl<R> !UnwindSafe for Battle<R>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,