pub struct ActivePlayers(/* private fields */);Expand description
An ordered, deterministic set of players who owe a decision.
Wraps a BTreeSet so iteration order is stable (ascending by seat index)
rather than the per-process random order of a hashed set. Determinism is the
engine’s core promise, so ordering is part of the observable contract: two
replays of the same seed and inputs must visit active players in the same
order. The backing collection is intentionally not exposed.
Cardinality carries meaning:
- empty during engine-only resolution steps (adjudicating simultaneous orders, running a deterministic resolution pass),
- one for strictly alternating games (the common case),
- many during simultaneous or secret phases.
Implementations§
Source§impl ActivePlayers
impl ActivePlayers
Sourcepub fn all(num_players: u32) -> Self
pub fn all(num_players: u32) -> Self
Returns the set of all real seats 0..num_players.
Does not include PlayerId::CHANCE.
Trait Implementations§
Source§impl Clone for ActivePlayers
impl Clone for ActivePlayers
Source§fn clone(&self) -> ActivePlayers
fn clone(&self) -> ActivePlayers
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActivePlayers
impl Debug for ActivePlayers
Source§impl Default for ActivePlayers
impl Default for ActivePlayers
Source§fn default() -> ActivePlayers
fn default() -> ActivePlayers
Returns the “default value” for a type. Read more
Source§impl FromIterator<PlayerId> for ActivePlayers
impl FromIterator<PlayerId> for ActivePlayers
Source§impl<'a> IntoIterator for &'a ActivePlayers
impl<'a> IntoIterator for &'a ActivePlayers
Source§impl PartialEq for ActivePlayers
impl PartialEq for ActivePlayers
Source§fn eq(&self, other: &ActivePlayers) -> bool
fn eq(&self, other: &ActivePlayers) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ActivePlayers
impl StructuralPartialEq for ActivePlayers
Auto Trait Implementations§
impl Freeze for ActivePlayers
impl RefUnwindSafe for ActivePlayers
impl Send for ActivePlayers
impl Sync for ActivePlayers
impl Unpin for ActivePlayers
impl UnsafeUnpin for ActivePlayers
impl UnwindSafe for ActivePlayers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more