| Summary: | Program will crash when a pokerHand of TrioX or TrioXX is played | ||
|---|---|---|---|
| Product: | Group 8 (2019) | Reporter: | LXL <xinlinli7-c> |
| Component: | Player | Assignee: | ZLQ <leqizheng2-c> |
| Status: | RESOLVED FIXED | ||
| Severity: | blocker | CC: | leqizheng2-c, yanglou3-c |
| Priority: | --- | ||
| Version: | Version1.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS | ||
|
Description
LXL
2019-12-04 21:25:20 HKT
The problem is caused by: 1. When constructing a poker hand with kickers, it uses .subList() to split the original card list. Therefore, the components are actually different parts of the same ArrayList<Card>. 2. When invoking getCardList(), it concatenates the kicker to its components, which is equivalent to insert the kickers to the original array list and hence goes wrong. The problem has been solved, it returns a new array list with the same elements. |