pub struct Player<'a> { /* private fields */ }
Expand description
A player node in the game tree
A player node represents a place where one of the players chooses what happens next.
Implementations§
Source§impl<'a> Player<'a>
impl<'a> Player<'a>
Sourcepub fn name(&self) -> &'a EscapedStr
pub fn name(&self) -> &'a EscapedStr
The name of the node
Sourcepub fn player_num(&self) -> usize
pub fn player_num(&self) -> usize
The player acting at this node
This will always be between 1 and the number of players.
Sourcepub fn infoset_name(&self) -> Option<&'a EscapedStr>
pub fn infoset_name(&self) -> Option<&'a EscapedStr>
The infoset’s name
If the name is omitted, it may be defined on a different node.
Sourcepub fn actions(&self) -> &[(&'a EscapedStr, Node<'a>)]
pub fn actions(&self) -> &[(&'a EscapedStr, Node<'a>)]
All the actions a player can take with names
Sourcepub fn outcome_name(&self) -> Option<&'a EscapedStr>
pub fn outcome_name(&self) -> Option<&'a EscapedStr>
The name of the outcome
If omitted it may still be defined on another node.
Sourcepub fn outcome_payoffs(&self) -> Option<&[BigRational]>
pub fn outcome_payoffs(&self) -> Option<&[BigRational]>
Payoffs associated with the outcome
If ommited they may be defined on another node.
Trait Implementations§
impl<'a> StructuralPartialEq for Player<'a>
Auto Trait Implementations§
impl<'a> Freeze for Player<'a>
impl<'a> RefUnwindSafe for Player<'a>
impl<'a> Send for Player<'a>
impl<'a> Sync for Player<'a>
impl<'a> Unpin for Player<'a>
impl<'a> UnwindSafe for Player<'a>
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