Bug 301 - compareTo() return wrong result
Summary: compareTo() return wrong result
Status: RESOLVED FIXED
Alias: None
Product: Bro_Doudizhu
Classification: Unclassified
Component: entities (show other bugs)
Version: v_1.0
Hardware: PC Windows
: High critical
Assignee: chaohuili0627
URL:
Depends on:
Blocks:
 
Reported: 2019-11-02 23:17 HKT by chaohuili0627
Modified: 2019-11-10 11:22 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chaohuili0627 2019-11-02 23:17:15 HKT
3 4 5 or 33 44 can be played while cardToHand() returns Illegal. There may be some logical errors in compareTo() in Hand.java
Comment 1 chaohuili0627 2019-11-10 11:22:29 HKT
There were some logic problems in Card.compareTo() because of its complex logic flow. The bug has been well fixed by combining compareTo() and isSameCatogory() and defining the return type as boolean.