31 lines
1.0 KiB
Rust
31 lines
1.0 KiB
Rust
use kings_eunuch::hand_building::{find_flush, Card};
|
|
|
|
fn main() {
|
|
println!("=== King's Eunuch Poker Hand Evaluator ===\n");
|
|
println!("A poker training tool for learning hand evaluation and game theory.\n");
|
|
println!("Run 'cargo test' to see all hand detection tests!\n");
|
|
|
|
// Quick demo: Flush detection
|
|
println!("--- Demo: Flush Detection ---");
|
|
let flush_cards: Vec<Card> = ["Ah", "Kh", "Qh", "Jh", "9h"]
|
|
.iter()
|
|
.map(|s| Card::str_to_card(s).unwrap())
|
|
.collect();
|
|
|
|
match find_flush(&flush_cards) {
|
|
Some(cards) => {
|
|
println!("✓ Flush detected!");
|
|
println!(" Found {} cards in the flush", cards.len());
|
|
}
|
|
None => println!("✗ No flush found"),
|
|
}
|
|
|
|
println!("\nFor comprehensive testing, run: cargo test");
|
|
println!("For specific test suites:");
|
|
println!(" cargo test flush");
|
|
println!(" cargo test straight");
|
|
println!(" cargo test pair");
|
|
println!(" cargo test straight_flush");
|
|
println!(" cargo test high_card");
|
|
}
|