[][src]Struct rust_poker::hand_evaluator::Hand

pub struct Hand { /* fields omitted */ }

64 bit representation of poker hand for use in evaluator

Bits 0-31: key to non flush lookup table Bits 32-35: card counter Bits 48-63: suit counter Bits 64-128: Bit mask for all cards (suits in 16 bit groups)

Implementations

impl Hand[src]

pub fn from_hole_cards(c1: u8, c2: u8) -> Hand[src]

Create hand from hole cards

pub fn from_bit_mask(mask: u64) -> Hand[src]

construct a Hand object from board mask

pub const fn get_key(self) -> u64[src]

Return first 64 bits

pub const fn get_mask(self) -> u64[src]

Return last 64 bits

pub const fn get_rank_key(self) -> usize[src]

get rank key of card for lookup table

pub const fn get_counters(self) -> u32[src]

Return counter bits

pub fn get_flush_key(self) -> usize[src]

Get flush key of card for lookup table

Returns 0 if there is no flush

pub fn has_flush(self) -> bool[src]

pub fn count(self) -> u32[src]

pub fn empty() -> Hand[src]

pub fn suit_count(self, suit: u8) -> i32[src]

Get the number of cards for a suit

Trait Implementations

impl Add<Hand> for Hand[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Hand> for Hand[src]

impl Clone for Hand[src]

impl Copy for Hand[src]

impl Debug for Hand[src]

impl Eq for Hand[src]

impl PartialEq<Hand> for Hand[src]

Auto Trait Implementations

impl RefUnwindSafe for Hand

impl Send for Hand

impl Sync for Hand

impl Unpin for Hand

impl UnwindSafe for Hand

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,