From 599e5ae027f6459592d2cb574bb278bff063b330 Mon Sep 17 00:00:00 2001 From: TRC9696 Date: Mon, 30 Jan 2023 17:49:33 +0100 Subject: [PATCH] refactoring: renamed player1Won to player1WonTheGame --- src/main/java/game/StartTicTacToeGame.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/game/StartTicTacToeGame.java b/src/main/java/game/StartTicTacToeGame.java index f82f46f..76bf9cd 100644 --- a/src/main/java/game/StartTicTacToeGame.java +++ b/src/main/java/game/StartTicTacToeGame.java @@ -315,7 +315,7 @@ public class StartTicTacToeGame implements ActionListener{ } } - public void player1Won() { + public void player1WonTheGame() { label.setText("Spieler 1 hat gewonnen."); label.setBounds(250,20,500,50); fieldButton.setVisible(false); @@ -351,31 +351,31 @@ public class StartTicTacToeGame implements ActionListener{ public void check() { if(player1fieldButtonPressed && player1fieldButton2Pressed && player1fieldButton3Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButton4Pressed && player1fieldButton5Pressed && player1fieldButton6Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButton7Pressed && player1fieldButton8Pressed && player1fieldButton9Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButtonPressed && player1fieldButton5Pressed && player1fieldButton6Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButtonPressed && player1fieldButton4Pressed && player1fieldButton7Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButton2Pressed && player1fieldButton5Pressed && player1fieldButton8Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButton3Pressed && player1fieldButton6Pressed && player1fieldButton9Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButtonPressed && player1fieldButton5Pressed && player1fieldButton9Pressed) { - player1Won(); + player1WonTheGame(); } else if(player1fieldButton3Pressed && player1fieldButton5Pressed && player1fieldButton7Pressed) { - player1Won(); + player1WonTheGame(); } if(player2fieldButtonPressed && player2fieldButton2Pressed && player2fieldButton3Pressed) {