fixed bug which misidentified bigger pair in two pair
This commit is contained in:
parent
11c5886951
commit
5f7dba942c
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user