Files
pokerfreak/src/sizing/pot_fractions.rs
T
2026-10-28 11:51:24 +01:00

11 lines
355 B
Rust

use crate::game::Spot;
/// Pot fractions offered for free-form sizing.
pub const FRACTIONS: [f64; 3] = [1.0 / 3.0, 2.0 / 3.0, 1.0];
/// Raise-to for a bet of `fraction` of the pot after hero calls:
/// `to_call + fraction * (pot + to_call)`.
pub fn raise_to(spot: &Spot, fraction: f64) -> f64 {
spot.to_call + fraction * (spot.pot + spot.to_call)
}