| Summary: | Next Player is not updated when playing draw four card | ||
|---|---|---|---|
| Product: | .CS3343 Group2 2324A Uno Game | Reporter: | kaiskafel2-c |
| Component: | Game | Assignee: | tinloklee2-c |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Attachments: | Attachment: Color is not updated when playing draw four card | ||
|
Description
kaiskafel2-c
2023-12-07 21:33:05 HKT
Created attachment 162 [details]
Attachment: Color is not updated when playing draw four card
I will try to resolve the problem. Please also provide the seed of the game if possible. Found seed 210376603 with the problem. (didn't have this problem in our previous code :/, or in my own branch) Problem found. This is caused by game.getNextPlayer() falsely skipping 2 players. The actual target still drew the cards but since the game skipped 2 players, it appeared to us that the next player did not draw cards. Thank you for your debugging efforts! (In reply to kaiskafel2-c from comment #0) > The current card is GREEN 6, and user played Draw Four and change color to > RED, but the current card changed into Draw Four (Green) as the previous > card was GREEN 6 > > When the Draw Four card is played, the user will need to input the color > that the user intend to, and the system will check the validity of the color > passed by the user where it should be either Red, Green, Blue, or Yellow. > Then, the system will update the current card to Draw Card (*new color > passed by the user*) > > Steps to reproduce: > 1. Run the main function > 2. Play the game until it is the user's turn, and user has the Draw Four card > 3. Play the Draw Four Card and input the color to change > > Expected result: the game will update the current color to the new color > passed by the user (RED in this case) > > Actual result: the game does not update the current card color to the new > color passed by the user (still GREEN due to the previous current card: > GREEN 6) The actual error is that the next Player does not draw cards after Draw Four Card is played, and it is now solved. |