Function onejoker::poker::games::ace_to_five::ojp_a5_value
source ยท pub fn ojp_a5_value(h: &Hand) -> HandValue
Expand description
wiki | Ace-to-five evaluator
use onejoker::prelude::*;
use onejoker::poker::{ojp_a5_value};
let h1 = Hand::new(DeckType::Low).init(hand!("3s","9s","7d","5c","2c"));
let h2 = Hand::new(DeckType::Low).init(hand!("7s","4s","As","Qd","6c"));
let v1 = ojp_a5_value(&h1);
let v2 = ojp_a5_value(&h2);
assert!(v1 < v2); // nine-high beats queen-high