Bug 218 - Same color and same number tile should come together when sorting by number
Summary: Same color and same number tile should come together when sorting by number
Status: RESOLVED FIXED
Alias: None
Product: Gp10
Classification: Unclassified
Component: java (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Assignee: whng28-c
URL:
Depends on:
Blocks:
 
Reported: 2017-11-26 02:44 HKT by whng28-c
Modified: 2017-11-26 02:44 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 whng28-c 2017-11-26 02:44:44 HKT
1. Create a Rack class with 5 tiles,
Tile t1 = new Tile(5, Color.Red);
Tile t2 = new Tile(5, Color.Blue);
Tile t3 = new Tile(5, Color.Red);
Tile t4 = new Tile(2, Color.Yellow);
Tile t5 = new Tile(1, Color.Red);
2. Use the method of sortByNumber()

Expected:
- t5 > t4 > t2 > t1 > t3

Actual:
- t5 > t4 > t1 > t2 > t3