pub trait HasCutsForDeal {
// Required methods
fn cuts_for_deal(&self) -> &CutsForDeal;
fn cuts_for_deal_mut(&mut self) -> &mut CutsForDeal;
// Provided methods
fn cut_for_deal(&self, player: Player) -> Option<&Card> { ... }
fn cut_for_deal_mut(&mut self, player: Player) -> &mut Option<Card> { ... }
}Expand description
Trait for game states that track the “cut for deal” phase.
Required Methods§
Sourcefn cuts_for_deal(&self) -> &CutsForDeal
fn cuts_for_deal(&self) -> &CutsForDeal
Immutable access to both cuts.
Sourcefn cuts_for_deal_mut(&mut self) -> &mut CutsForDeal
fn cuts_for_deal_mut(&mut self) -> &mut CutsForDeal
Mutable access to both cuts.
Provided Methods§
Sourcefn cut_for_deal(&self, player: Player) -> Option<&Card>
fn cut_for_deal(&self, player: Player) -> Option<&Card>
Returns the card cut by the given player, if any.
Sourcefn cut_for_deal_mut(&mut self, player: Player) -> &mut Option<Card>
fn cut_for_deal_mut(&mut self, player: Player) -> &mut Option<Card>
Returns a mutable reference to the cut slot for the given player.