Bug 352

Summary: Improper return values of PokerHand.compareTo(BombBase)
Product: Group 8 (2019) Reporter: ZLQ <leqizheng2-c>
Component: PokerHandAssignee: SYR <yuransun2-c>
Status: RESOLVED FIXED    
Severity: normal CC: leqizheng2-c, yujiaxu4-c
Priority: ---    
Version: Version1.0   
Hardware: PC   
OS: Windows   

Description ZLQ 2019-12-05 14:30:16 HKT
Steps to reproduce:
1. Create a Solo and Bomb instance, called solo and bomb resp.
2. Call solo.compareTo(bomb).

Expected Result:
It should return -1, which means the solo is smaller than the bomb.

Actual Result:
It returns -2, which means neither the solo is greater than the bomb, nor the bomb is greater than the solo.

More information:
When implementing compareTo, judge whether the parameter other is an instance of BombBase.
Comment 1 SYR 2019-12-05 15:10:59 HKT
Codes to check whether the parameter other is an instance of BombBase has been added. Hence the problem is solved now.