diff --git a/Game_Code/src/view/GameView.java b/Game_Code/src/view/GameView.java index c99633195e9683632e9f5d872700f60bf40376d4..c9510cdf826f17852fb81b7e25d60162c68ea1c6 100644 --- a/Game_Code/src/view/GameView.java +++ b/Game_Code/src/view/GameView.java @@ -209,7 +209,7 @@ System.out.println(prefer.getPreferredSize()); * @brief display message for game over * @param whichplayer is the indicator for the player */ - public void gameOver(int whichplayer){ + public void gameOver(int whichplayer, double time){ /** * - If the computer wins, display winning message for the computer @@ -217,11 +217,13 @@ System.out.println(prefer.getPreferredSize()); */ if(whichplayer==0){ JFrame overFrame = new JFrame("Game Over"); - JOptionPane.showMessageDialog(overFrame, "The game is over! The computer wins!"); + JOptionPane.showMessageDialog(overFrame, "The game is over! The computer wins!\n" + + " Your time = " + time); } else{ JFrame overFrame = new JFrame("Game Over"); - JOptionPane.showMessageDialog(overFrame, "The game is over! The player wins!"); + JOptionPane.showMessageDialog(overFrame, "The game is over! The player wins!\n" + + " Your time = " + time); } gameFrame.setVisible(false); welcome.setVisible(true);