chironaut 0.3.5

A poker game library for Texas Hold'em and other poker variants
Documentation
use chironaut::rules::{GameRules, GameVariant};

fn main() {
    println!("Testing Player Limits Based on Deck Constraints\n");
    
    // Calculate theoretical maximums
    println!("Theoretical Maximum Players for Each Variant:");
    println!("NLHE: {} players", GameRules::max_players_for_variant(GameVariant::TexasHoldem));
    println!("PLO4: {} players", GameRules::max_players_for_variant(GameVariant::OmahaHoldem4));
    println!("PLO5: {} players", GameRules::max_players_for_variant(GameVariant::OmahaHoldem5));
    println!("PLO6: {} players", GameRules::max_players_for_variant(GameVariant::OmahaHoldem6));
    println!();
    
    // Test default limits
    println!("Default Max Players in Rules Constructors:");
    println!("NLHE: {} players", GameRules::nlhe(2, 5).max_players);
    println!("PLO4: {} players", GameRules::plo4(2, 5).max_players);
    println!("PLO5: {} players", GameRules::plo5(2, 5).max_players);
    println!("PLO6: {} players", GameRules::plo6(2, 5).max_players);
    println!();
    
    // Test with_player_limits method with values exceeding theoretical maximums
    println!("Testing with_player_limits Safety with Excessive Values:");
    println!("NLHE with 30 max: {} players", 
             GameRules::nlhe(2, 5).with_player_limits(2, 30).max_players);
    println!("PLO4 with 15 max: {} players", 
             GameRules::plo4(2, 5).with_player_limits(2, 15).max_players);
    println!("PLO5 with 12 max: {} players", 
             GameRules::plo5(2, 5).with_player_limits(2, 12).max_players);
    println!("PLO6 with 10 max: {} players", 
             GameRules::plo6(2, 5).with_player_limits(2, 10).max_players);
    println!();
    
    // Test boundary conditions
    println!("Edge Case Tests:");
    
    // Try to create a game with min players > max players allowed by deck
    let plo6_rules = GameRules::plo6(2, 5).with_player_limits(8, 9);
    println!("PLO6 with min_players=8, max_players=9: min={}, max={}", 
             plo6_rules.min_players, plo6_rules.max_players);
    
    // Will this cause issues when creating a game?
    if plo6_rules.min_players > plo6_rules.max_players {
        println!("ISSUE DETECTED: min_players > max_players!");
    } else {
        println!("Rule constraints properly applied.");
    }
}