wip
This commit is contained in:
@@ -16,7 +16,7 @@ pub enum HandType {
|
||||
}
|
||||
|
||||
#[derive(PartialEq)]
|
||||
struct PokerHand {
|
||||
pub struct PokerHand {
|
||||
cards: Vec<PlayingCard>,
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ impl PartialOrd for PokerHand {
|
||||
}
|
||||
|
||||
impl PokerHand {
|
||||
fn new(mut cards: Vec<PlayingCard>) -> Self {
|
||||
pub fn new(mut cards: Vec<PlayingCard>) -> Self {
|
||||
assert!(cards.len() == 5);
|
||||
|
||||
// Sorted highest card first
|
||||
@@ -172,7 +172,7 @@ impl PokerHand {
|
||||
count
|
||||
}
|
||||
|
||||
fn hand_type(&self) -> HandType {
|
||||
pub fn hand_type(&self) -> HandType {
|
||||
if is_straight_flush(self) {
|
||||
return HandType::StraightFlush;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user