fixed bug which misidentified bigger pair in two pair

This commit is contained in:
Jeffrey Paul 2024-05-18 21:18:16 -07:00
parent 11c5886951
commit 5f7dba942c

View File

@ -131,10 +131,10 @@ func (c Cards) twoPairBiggestPair() Rank {
}
if sorted[0].Rank == sorted[1].Rank && sorted[3].Rank == sorted[4].Rank {
return sorted[0].Rank
return sorted[3].Rank
}
if sorted[1].Rank == sorted[2].Rank && sorted[3].Rank == sorted[4].Rank {
return sorted[1].Rank
return sorted[3].Rank
}
panic("nope")
}