Struct gambit_parser::Player
source · [−]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
sourceimpl<'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> 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more