11 lines
355 B
Rust
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)
|
|
}
|