Skip to main content

HasCutsForDeal

Trait HasCutsForDeal 

Source
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§

Source

fn cuts_for_deal(&self) -> &CutsForDeal

Immutable access to both cuts.

Source

fn cuts_for_deal_mut(&mut self) -> &mut CutsForDeal

Mutable access to both cuts.

Provided Methods§

Source

fn cut_for_deal(&self, player: Player) -> Option<&Card>

Returns the card cut by the given player, if any.

Source

fn cut_for_deal_mut(&mut self, player: Player) -> &mut Option<Card>

Returns a mutable reference to the cut slot for the given player.

Implementors§