Bug 511 - [WRONG BUG CASE, PLS IGNORE IT]The first player should not skip the first turn
Summary: [WRONG BUG CASE, PLS IGNORE IT]The first player should not skip the first turn
Status: VERIFIED INVALID
Alias: None
Product: 2021A-CS3343-Gp17-Big2PokerGame
Classification: Unclassified
Component: GameController (show other bugs)
Version: 2.0
Hardware: PC Windows
: Normal enhancement
Assignee: CHAN Tsz Yin
URL:
Depends on:
Blocks:
 
Reported: 2020-12-03 11:32 HKT by yuctam4-c
Modified: 2020-12-05 23:13 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:32:29 HKT
The first player in the first turn is not expected to skip the first turn in the first round.
Comment 1 yuctam4-c 2020-12-03 11:33:33 HKT
developing a function to ensure the player is not the first player in the first round
Comment 2 yuctam4-c 2020-12-03 11:34:27 HKT
New Function Added

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();
    }