View/GamePVPView.java
public void displayTotalScores(){
        if(ply1WinCount == 3){
            Alert alert = new Alert(Alert.AlertType.NONE, "Player 1 has won \nPlayer 1 score: " + ply1WinCount +"\nPlayer 2 score: " + ply2WinCount);
            alert.getDialogPane().getStylesheets().add("/View/stylesheet.css");
            createEndAlert(alert);
            playerGamesPlayed++;
            ply1Streak++;
            player1RoundsWon++;
            player2RoundsLost++;
            System.out.println(player1RoundsWon+", " + player2RoundsLost);
            ply2Streak=0;
        }
        if(ply2WinCount == 3) {
            Alert alert = new Alert(Alert.AlertType.NONE, "Player 2 has won\nPlayer 1 score: " + ply1WinCount + "\nPlayer 2 score: " + ply2WinCount);
            alert.getDialogPane().getStylesheets().add("/View/stylesheet.css");
            createEndAlert(alert);
            playerGamesPlayed++;
            ply2Streak++;
            player1RoundsLost++;
            player2RoundsWon++;
            System.out.println(player1RoundsLost+", " + player2RoundsWon);
            ply1Streak=0;
        }
    }
/*Once either player has won three rounds an alert with the scores is created.
     *The game counters are changed accordingly
     */
Once either player has won three rounds an alert with the scores is created.
The game counters are changed accordingly
Once either player has won three rounds an alert with the scores is created . The game counters are changed accordingly
public void displayTotalScores(){
        if(ply1WinCount == 3){
            Alert alert = new Alert(Alert.AlertType.NONE, "Player 1 has won \nPlayer 1 score: " + ply1WinCount +"\nPlayer 2 score: " + ply2WinCount);
            alert.getDialogPane().getStylesheets().add("/View/stylesheet.css");
            createEndAlert(alert);
            playerGamesPlayed++;
            ply1Streak++;
            player1RoundsWon++;
            player2RoundsLost++;
            System.out.println(player1RoundsWon+", " + player2RoundsLost);
            ply2Streak=0;
        }
        if(ply2WinCount == 3) {
            Alert alert = new Alert(Alert.AlertType.NONE, "Player 2 has won\nPlayer 1 score: " + ply1WinCount + "\nPlayer 2 score: " + ply2WinCount);
            alert.getDialogPane().getStylesheets().add("/View/stylesheet.css");
            createEndAlert(alert);
            playerGamesPlayed++;
            ply2Streak++;
            player1RoundsLost++;
            player2RoundsWon++;
            System.out.println(player1RoundsLost+", " + player2RoundsWon);
            ply1Streak=0;
        }
    }
public void displayTotalScores ( ) { if ( ply1WinCount == 3 ) { Alert alert = new Alert ( Alert . AlertType . NONE , "Player 1 has won \nPlayer 1 score: " + ply1WinCount + "\nPlayer 2 score: " + ply2WinCount ) ; alert . getDialogPane ( ) . getStylesheets ( ) . add ( "/View/stylesheet.css" ) ; createEndAlert ( alert ) ; playerGamesPlayed ++ ; ply1Streak ++ ; player1RoundsWon ++ ; player2RoundsLost ++ ; System . out . println ( player1RoundsWon + ", " + player2RoundsLost ) ; ply2Streak = 0 ; } if ( ply2WinCount == 3 ) { Alert alert = new Alert ( Alert . AlertType . NONE , "Player 2 has won\nPlayer 1 score: " + ply1WinCount + "\nPlayer 2 score: " + ply2WinCount ) ; alert . getDialogPane ( ) . getStylesheets ( ) . add ( "/View/stylesheet.css" ) ; createEndAlert ( alert ) ; playerGamesPlayed ++ ; ply2Streak ++ ; player1RoundsLost ++ ; player2RoundsWon ++ ; System . out . println ( player1RoundsLost + ", " + player2RoundsWon ) ; ply1Streak = 0 ; } }
Once either player has won three rounds an alert with the scores is created.
Once either player has won three rounds an alert with the scores is created .