pub fn ojp_reference_evaluator(hand: &Hand, g: Scale) -> HandValue
Expand description

wiki | Default quick hand evaluator

This function is the default general-purpose evaluator for hands up to the “complete hand” size of the given scale (usually 5 cards). It returns a comparator value with level and rank information packed into a single 32-bit integer. The value can be compared directly: winning hands are smaller numbers. Such comparisons between hands of different sizes are not meaningful.

use onejoker::prelude::*;
use onejoker::poker::{ojp_reference_evaluator};

let hand = Hand::new(DeckType::English).init(hand!("As","Js","Ts","7s","5s"));
let v = ojp_reference_evaluator(&hand, Scale::HighHand);
assert_eq!(0x50458A, v);