Type Alias onejoker::poker::high_hand::HandValueHigh

source ·
pub type HandValueHigh = HandValue<HandLevelHigh>;
Expand description

wiki | Representing traditional “high” poker hands. HandValue subclass for traditional “high” poker hands.

Aliased Type§

struct HandValueHigh {
    pub level: HandLevelHigh,
    pub ranks: Vec<Rank>,
    pub value: u64,
}

Fields§

§level: HandLevelHigh

Value category of the hand; type varies by game.

§ranks: Vec<Rank>

Array of ranks of the cards in the hand.

§value: u64

Calculated numeric comparator: low is better.

Implementations§

source§

impl HandValueHigh

source

pub fn new(level: HandLevelHigh, ranks: &[Rank]) -> HandValueHigh

Create a new HandValueHigh] object.

Trait Implementations§

source§

impl HandValueTrait for HandValueHigh

source§

fn value(&self) -> u64

Final numeric comparator

source§

fn best() -> HandValueHigh

Best hand for this game

source§

fn worst() -> HandValueHigh

Worst hand for this game

source§

fn full_name(&self) -> String

Full English name of hand, e.g. “aces and fours with a jack”.

source§

fn ordered_for_display(&self, h: &Hand) -> aResult<Hand>

Return a new hand re-ordered for more meaningful display.