From 6157023cb327d9c272c6865302c62c847d5f7842 Mon Sep 17 00:00:00 2001 From: TRC9696 Date: Mon, 30 Jan 2023 17:50:56 +0100 Subject: [PATCH] refactoring: renamed player2Won to player2WonTheGame --- 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 76bf9cd..415932a 100644 --- a/src/main/java/game/StartTicTacToeGame.java +++ b/src/main/java/game/StartTicTacToeGame.java @@ -332,7 +332,7 @@ public class StartTicTacToeGame implements ActionListener{ backButton.setVisible(true); } - public void player2Won() { + public void player2WonTheGame() { label.setText("Spieler 2 hat gewonnen."); label.setBounds(250,20,500,50); fieldButton.setVisible(false); @@ -379,31 +379,31 @@ public class StartTicTacToeGame implements ActionListener{ } if(player2fieldButtonPressed && player2fieldButton2Pressed && player2fieldButton3Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButton4Pressed && player2fieldButton5Pressed && player2fieldButton6Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButton7Pressed && player2fieldButton8Pressed && player2fieldButton9Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButtonPressed && player2fieldButton5Pressed && player2fieldButton6Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButtonPressed && player2fieldButton4Pressed && player2fieldButton7Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButton2Pressed && player2fieldButton5Pressed && player2fieldButton8Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButton3Pressed && player2fieldButton6Pressed && player2fieldButton9Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButtonPressed && player2fieldButton5Pressed && player2fieldButton9Pressed) { - player2Won(); + player2WonTheGame(); } else if(player2fieldButton3Pressed && player2fieldButton5Pressed && player2fieldButton7Pressed) { - player2Won(); + player2WonTheGame(); } } } \ No newline at end of file