| Summary: | Card value displayed inproperly | ||
|---|---|---|---|
| Product: | 2021A-CS3343-Gp17-Big2PokerGame | Reporter: | CHAN Tsz Yin <tychan423-c> |
| Component: | Card | Assignee: | Chung Ka Shing <kaschung4-c> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | hwchan58-c, kaschung4-c, waisumpo2-c, yuctam4-c, yuenchong9-c |
| Priority: | High | ||
| Version: | 1.0 | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Deadline: | 2020-12-04 | ||
|
Description
CHAN Tsz Yin
2020-12-04 11:05:15 HKT
I estimate it is related to the way how the program get the card suit and card digit value. From my observation, I can see that the pattern of all wrong results are the same. We can either change the way of getting the card suit and card digit value, or create alternative getter to make sure it will convert the value to the information we want. Yes, all of us agree that the problem should be in the way getting card suit and card digit value. However, we do not recommend to change the original getters as they will be called by another class to perform combination comparing and history storing. Okay, then I create two new getters specifically for displaying the card information.
My revised code here, please help me double check if it is correct:
public String printCardSymbol() {
return Character.toString(CARD_SUIT[suit]) + CARD_VALUE[value];
}
Double checked and it works well. |