fn showdown(&self, table_cards: &[Card]) -> (Vec<usize>, Score) {
        let scores = self
            .players
            .iter()
            .map(|p| match p.hole_cards {
                None => Score::folded(),
                Some((c1, c2)) => Score::calculate(vec![
                    c1,
                    c2,
                    table_cards[0],
                    table_cards[1],
                    table_cards[2],
                    table_cards[3],
                    table_cards[4],
                ]),
            })
            .collect::<Vec<Score>>();
        let max_score = scores.iter().max().unwrap();
        let splitters = scores
            .iter()
            .enumerate()
            .filter_map(|(i, s)| if s == max_score { Some(i) } else { None })
            .collect();

        (splitters, *max_score)
    }
/// Calculate the score of each player, determine the winning hand and the
/// winners.
Calculate the score of each player, determine the winning hand and the
winners.
Calculate the score of each player determine the winning hand and the winners .
fn showdown(&self, table_cards: &[Card]) -> (Vec<usize>, Score) {
        let scores = self
            .players
            .iter()
            .map(|p| match p.hole_cards {
                None => Score::folded(),
                Some((c1, c2)) => Score::calculate(vec![
                    c1,
                    c2,
                    table_cards[0],
                    table_cards[1],
                    table_cards[2],
                    table_cards[3],
                    table_cards[4],
                ]),
            })
            .collect::<Vec<Score>>();
        let max_score = scores.iter().max().unwrap();
        let splitters = scores
            .iter()
            .enumerate()
            .filter_map(|(i, s)| if s == max_score { Some(i) } else { None })
            .collect();
        (splitters, *max_score)
    }
fn showdown ( & self , table_cards : & [ Card ] ) -> ( Vec < usize > , Score ) { let scores = self . players . iter ( ) . map ( | p | match p . hole_cards { None => Score :: folded ( ) , Some ( ( c1 , c2 ) ) => Score :: calculate ( vec ! [ c1 c2 table_cards [ 0 ] table_cards [ 1 ] table_cards [ 2 ] table_cards [ 3 ] table_cards [ 4 ] ] ) , } ) . collect :: < Vec < Score > > ( ) ; let max_score = scores . iter ( ) . max ( ) . unwrap ( ) ; let splitters = scores . iter ( ) . enumerate ( ) . filter_map ( | ( i , s ) | if s == max_score { Some ( i ) } else { None } ) . collect ( ) ; ( splitters , * max_score ) }
Calculate the score of each player, determine the winning hand and the
winners.
Calculate the score of each player determine the winning hand and the winners .
&self
table_cards
&[Card]
&self
table_cards
&[Card]