15 lines
551 B
Rust
15 lines
551 B
Rust
use crate::game::Street;
|
|
use crate::read::draw::Draw;
|
|
use crate::read::hand_read::HandRead;
|
|
|
|
/// Outs that make a draw "real" regardless of its class.
|
|
pub const REAL_DRAW_OUTS: u8 = 8;
|
|
|
|
/// Hero holds a draw worth raising with: open-ended, flush or combo, or at least
|
|
/// [`REAL_DRAW_OUTS`] outs. Never on the river (no cards to come).
|
|
pub fn has_real_draw(read: &HandRead, street: Street) -> bool {
|
|
street != Street::River
|
|
&& (matches!(read.draw, Draw::OpenEnded | Draw::Flush | Draw::Combo)
|
|
|| read.outs >= REAL_DRAW_OUTS)
|
|
}
|