From 81ef372c46723d678bcb37ecf964fbc5d43f9f1f Mon Sep 17 00:00:00 2001 From: TRC9696 Date: Mon, 30 Jan 2023 17:24:00 +0100 Subject: [PATCH] Added player 1 won method --- src/main/java/game/StartTicTacToeGame.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/game/StartTicTacToeGame.java b/src/main/java/game/StartTicTacToeGame.java index 509b635..ee9755d 100644 --- a/src/main/java/game/StartTicTacToeGame.java +++ b/src/main/java/game/StartTicTacToeGame.java @@ -311,5 +311,22 @@ public class StartTicTacToeGame implements ActionListener{ player2button9Pressed = true; } } + } + public void player1Won() { + label.setText("Spieler 1 hat gewonnen."); + label.setBounds(250,20,500,50); + button.setVisible(false); + button2.setVisible(false); + button3.setVisible(false); + button4.setVisible(false); + button5.setVisible(false); + button6.setVisible(false); + button7.setVisible(false); + button8.setVisible(false); + button9.setVisible(false); + + //zurück button + backButton.setVisible(true); + } } \ No newline at end of file