[][src]Struct weasel::round::Rounds

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

Manages the battle's rounds. The main purpose is to tell which actor(s) will act next.

Implementations

impl<R: BattleRules> Rounds<R>[src]

pub fn model(&self) -> &RoundsModel<R>[src]

Returns the rounds model. It contains all data starting from which RoundsRules can compute the order of acting in this battle.

pub fn model_mut(&mut self) -> &mut RoundsModel<R>[src]

Returns a mutable reference to the rounds model.

pub fn is_acting(&self, entity_id: &EntityId<R>) -> bool[src]

Returns true if the entity with the given id is among the current actors. Entity existence is not verified.

pub fn state(&self) -> &TurnStateType<R>[src]

Returns the state of the current turn.

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

Returns the RoundRules in use.

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

Returns a mutable reference to the RoundRules in use.

pub fn completed_rounds(&self) -> RoundsCount[src]

Returns the number of completed rounds.

pub fn completed_turns(&self) -> TurnsCount[src]

Returns the number of completed turns.

Auto Trait Implementations

impl<R> RefUnwindSafe for Rounds<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: RefUnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: RefUnwindSafe,
    <R as BattleRules>::RR: RefUnwindSafe,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: RefUnwindSafe

impl<R> Send for Rounds<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Send,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Send,
    <R as BattleRules>::RR: Send,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Send

impl<R> Sync for Rounds<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Sync,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Sync,
    <R as BattleRules>::RR: Sync,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Sync

impl<R> Unpin for Rounds<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: Unpin,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: Unpin,
    <R as BattleRules>::RR: Unpin,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: Unpin

impl<R> UnwindSafe for Rounds<R> where
    <<R as BattleRules>::CR as CharacterRules<R>>::CreatureId: UnwindSafe,
    <<R as BattleRules>::CR as CharacterRules<R>>::ObjectId: UnwindSafe,
    <R as BattleRules>::RR: UnwindSafe,
    <<R as BattleRules>::RR as RoundsRules<R>>::RoundsModel: UnwindSafe

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>,