Trait onejoker::poker::hand_value::HandEvaluatorTrait

source ·
pub trait HandEvaluatorTrait<V: HandValueTrait> {
    // Required method
    fn reference_evaluator(&self, _h: &Hand) -> aResult<V>;

    // Provided methods
    fn partial_evaluator(&self, h: &Hand) -> aResult<V> { ... }
    fn lookup_evaluator(&self, h: &Hand) -> aResult<V> { ... }
    fn fast_value(&self, h: &Hand) -> u64 { ... }
    fn value_of(&self, h: &Hand) -> aResult<V> { ... }
}
Expand description

wiki | Common layout of hand evaluators All specific game hand evaluators must implement this trait.

Required Methods§

source

fn reference_evaluator(&self, _h: &Hand) -> aResult<V>

Default evaluator, must implement.

Provided Methods§

source

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

Evaluator for partial hands, for determining stud betting, etc.

source

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

Fast lookup-table based evaluator.

source

fn fast_value(&self, h: &Hand) -> u64

Fast no-frills evaluator if all you care about is what wins.

source

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

General-use entry point that picks the right evaluator.

Implementors§