Bug 501

Summary: Player is unable to play Full House which has a higher rank than previous player's Full House
Product: 2021A-CS3343-Gp17-Big2PokerGame Reporter: hwchan58-c
Component: PlayAssignee: CHAN Tsz Yin <tychan423-c>
Status: CONFIRMED ---    
Severity: critical CC: hwchan58-c, kaschung4-c, waisumpo2-c, yuctam4-c, yuenchong9-c
Priority: High    
Version: 2.0   
Hardware: Macintosh   
OS: Mac OS   

Description hwchan58-c 2020-12-01 00:52:00 HKT
Compare() does not cater to checking the rank of FULL HOUSE

private boolean compare(Combination previousCombination, Combination currentCombination, int numberOfCard) {
        
     if (currentCombination.getCardByIndex(numberOfCard).getValue() > 
         previousCombination.getCardByIndex(numberOfCard).getValue()) {
            return true;
        } else if (currentCombination.getCardByIndex(numberOfCard).getValue() == 
                   previousCombination.getCardByIndex(numberOfCard).getValue()) {
                       
                  if (currentCombination.getCardByIndex(numberOfCard).getSuit() 
                  > previousCombination.getCardByIndex(numberOfCard).getSuit()) {
                       return true;
                  } else {
                       return false;
                  }
                } else {
                    return false;
                }
        }