Bug 353 - CardAnalyzer does not properly analyze the poker hand AAABBB.
Summary: CardAnalyzer does not properly analyze the poker hand AAABBB.
Status: RESOLVED FIXED
Alias: None
Product: Group 8 (2019)
Classification: Unclassified
Component: Factory (show other bugs)
Version: Version1.0
Hardware: PC Windows
: --- normal
Assignee: LXL
URL:
Depends on:
Blocks:
 
Reported: 2019-12-05 14:36 HKT by ZLQ
Modified: 2019-12-05 15:40 HKT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ZLQ 2019-12-05 14:36:59 HKT
Steps to Reproduce:
1. Create a List<Card> called cards, and add cards Club 3, Diamond 3, Heart 3, Club 4, Diamond 4, and Heat 4.
2. Invoke CardAnalyzer.isAirplane(cards).

Expected Result:
CardAnalyzed.isAirplane should return true.

Actual Result:
CardAnalyzer.isAirplane returns false.

More Information:
Besides the forms of AAABBBXY and AAABBBXXYY, AAABBB is also a type of airplane. May consider adding judge conditions that whether cards.size()%3 equals to 0, and whether there is no kicker.
Comment 1 LXL 2019-12-05 15:30:51 HKT
The code for checking the existence of kickers is added in the beginning of the method, which successfully solved the problem.

This bug is fixed.