pub enum TurnAction {
Discard(Card),
Knock {
discard: Card,
melds: Melds,
},
BigGin(Melds),
}Expand description
How to end a turn from an 11-card hand
Variants§
Discard(Card)
Shed a card and pass the turn
Knock
Shed a card and knock, spreading the given arrangement
The arrangement decides what the defender may lay off, so it is
chosen explicitly; best_melds(hand - discard.into()) recovers the
deadwood-minimizing choice.
Fields
BigGin(Melds)
Declare big gin with all 11 cards arranged and no discard
Trait Implementations§
Source§impl Clone for TurnAction
impl Clone for TurnAction
Source§fn clone(&self) -> TurnAction
fn clone(&self) -> TurnAction
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 moreimpl Copy for TurnAction
Source§impl Debug for TurnAction
impl Debug for TurnAction
impl Eq for TurnAction
Source§impl Hash for TurnAction
impl Hash for TurnAction
Source§impl PartialEq for TurnAction
impl PartialEq for TurnAction
impl StructuralPartialEq for TurnAction
Auto Trait Implementations§
impl Freeze for TurnAction
impl RefUnwindSafe for TurnAction
impl Send for TurnAction
impl Sync for TurnAction
impl Unpin for TurnAction
impl UnsafeUnpin for TurnAction
impl UnwindSafe for TurnAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more