Implemented hand and deck

This commit is contained in:
Jan-Peter von Hunnius 2025-02-13 17:31:39 +01:00
parent 77315c79b0
commit ac25a1caea
8 changed files with 451 additions and 59 deletions

11
api/tests/hand_test.rs Normal file
View file

@ -0,0 +1,11 @@
use poker_api::card::Card;
use poker_api::hand::Hand;
#[test]
fn test_hand_integration() {
let mut hand = Hand::new();
hand.add_card(Card::from_string("As").unwrap()).unwrap();
hand.add_card(Card::from_string("Ks").unwrap()).unwrap();
assert_eq!(hand.size(), 2);
assert_eq!(hand.to_string(), "As Ks");
}