Corrected hand evaluator based on Java implementation
This commit is contained in:
parent
7ff520ca20
commit
e22f2cca0f
9 changed files with 1107 additions and 189 deletions
|
|
@ -124,6 +124,12 @@ impl Hand {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
// Add a card to the hand by its index (0-51)
|
||||
pub fn add_card_from_index(&mut self, index: u8) -> Result<(), &'static str> {
|
||||
let card = Card::from_index(index)?;
|
||||
self.add_card(card)
|
||||
}
|
||||
|
||||
// Remove the last card in the hand
|
||||
pub fn remove_card(&mut self) {
|
||||
if self.size > 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue