| Summary: | unable to output Nine Gate Hand | ||
|---|---|---|---|
| Product: | Mahjong Calculator | Reporter: | Wong Jyu Fung <jfwong3-c> |
| Component: | Mahjong | Assignee: | Wong Jyu Fung <jfwong3-c> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | kinlokho2-c |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | Captured screen of incorrect output for test case "Nine Gate Hand" | ||
|
Description
Wong Jyu Fung
2018-11-13 22:57:12 HKT
[Modified version] Description: When we input a set of tiles which should be able to complete the 'nine gate hand' into the Mahjong calculator. We discovered that the output result is not the hand type we want. How to reproduce: 1. Input 14 tiles in the mahjong calculator which can fulfill the rule - " Hand in any one suit (characters / bamboo / dot) consisting of 1112345678999, must be totally concealed". 2. Submit to check the hand type and its fan point. Expected result: The output of points should be 13 and the name of the hand type should be 'nine gate hand' Actual result: The output of points is only 7 and the name of the hand type become 'all one suit'. I have we check the winTracker Class and I found that the program is actually missing the checking of Nine chain. Therefore, It was unable to check the nine chain. After we add the check nine chain after the check All one suit. Therefore, it's now able to check the nine chain and the actual outcome match the expected outcome I have rechecked the winTracker Class and I found that the program actually misses the checking of Nine Gate Hand. Therefore, It was unable to
output the correct name of hand type.
After editing the code in class WinTracker to check "Nine Gate Hand" right after the "All one suit"
private void checkNineGate() {
if(MJUtil.isNineGate(win)) {
new CountNineGate().count();
} else {
checkAllTriplet(true);
}
}
As a result, the system is able to check the Nine Gate Hand now and the actual outcome matches the expected outcome.
Description: When we input a set of tiles which should be able to complete the 'nine gate hand' into the Mahjong calculator. We discovered that the output result is not the hand type we want. How to reproduce: 1. Input 14 tiles which can fulfill the rule - " Hand in any one suit (characters / bamboo / dot) consisting of 1112345678999, must be totally concealed". 2. Select tab "Run", following by option "Run" in Eclipse Java Oxygen(version 3a) Expected result: The output of points should be 13 and the name of the hand type should be 'nine gate hand' Actual result: The output of points is only 7 and the name of the hand type become 'all one suit'. Possible cause: Revised the code whether checking the "Nine Gate Hand" is missing or not in class WinTracker or class MJUtil. Created attachment 21 [details]
Captured screen of incorrect output for test case "Nine Gate Hand"
|