Bug 510 - Cannot show the Option Menu again after skipping error message display
Summary: Cannot show the Option Menu again after skipping error message display
Status: RESOLVED FIXED
Alias: None
Product: 2021A-CS3343-Gp17-Big2PokerGame
Classification: Unclassified
Component: GameController (show other bugs)
Version: 2.0
Hardware: PC Windows
: --- critical
Assignee: CHAN Tsz Yin
URL:
Depends on:
Blocks:
 
Reported: 2020-12-03 11:03 HKT by yuctam4-c
Modified: 2020-12-03 11:53 HKT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yuctam4-c 2020-12-03 11:03:45 HKT
When Skip count equal to 4, the following player is not allowed to skip this turn. When the player chooses to skip this round, the error message shown on the console and the expected output is allowing the player to choose another option.
Comment 1 yuctam4-c 2020-12-03 11:04:57 HKT
developing a new function to handle the situation
Comment 2 yuctam4-c 2020-12-03 11:07:06 HKT
New Funtion Created :

 public void skip() {
        if (skipCount < 4 && !isFirstPlayer) {
            addHistory(currentPlayer.getName(), null);
            handleSkipPlay();
            currentPlayerIndex = nextPlayerIndex();
            skipCount++;
            turn++;
        } else {
            System.out.println("Your cannot skip! Please choose again!");
            pause();
        }
        incrementRound();
    }