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§
sourcefn reference_evaluator(&self, _h: &Hand) -> aResult<V>
fn reference_evaluator(&self, _h: &Hand) -> aResult<V>
Default evaluator, must implement.
Provided Methods§
sourcefn partial_evaluator(&self, h: &Hand) -> aResult<V>
fn partial_evaluator(&self, h: &Hand) -> aResult<V>
Evaluator for partial hands, for determining stud betting, etc.
sourcefn lookup_evaluator(&self, h: &Hand) -> aResult<V>
fn lookup_evaluator(&self, h: &Hand) -> aResult<V>
Fast lookup-table based evaluator.
sourcefn fast_value(&self, h: &Hand) -> u64
fn fast_value(&self, h: &Hand) -> u64
Fast no-frills evaluator if all you care about is what wins.