diff --git a/src/main/java/Gui/ActionHandler.java b/src/main/java/Gui/ActionHandler.java index de84add..a5f04a3 100644 --- a/src/main/java/Gui/ActionHandler.java +++ b/src/main/java/Gui/ActionHandler.java @@ -16,14 +16,14 @@ public class ActionHandler implements ActionListener { System.exit(0); } - if (e.getSource() == GameGui.RestartBtn) { + if (e.getSource() == GameGui.LosingRestartBtn) { GameGui.questionNr = 0; GameGui.LosingPanel.setVisible(false); GameGui.currentQuestion = 1; restartGame.startGame(); } - if (e.getSource() == GameGui.RestartBtn1) { + if (e.getSource() == GameGui.WinningRestartBtn) { GameGui.questionNr = 0; GameGui.WinningPanel.setVisible(false); GameGui.currentQuestion = 1; diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index 145d796..52c2a30 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -17,7 +17,7 @@ public class GameGui implements GameGuiInterface { public static JPanel MainPanel, ButtonPanel, HeadingPanel, WinningPanel, LosingPanel; public static JLabel HeadlineLabel, QuestionLabel, WinningLabel, LosingLabel, CurrentQuestionNrLabel, HighScoreLabel; - public static JButton AnswersBtn1, AnswersBtn2, AnswersBtn3, AnswersBtn4, RestartBtn, RestartBtn1, ClosingBtn; + public static JButton AnswersBtn1, AnswersBtn2, AnswersBtn3, AnswersBtn4, LosingRestartBtn, WinningRestartBtn, ClosingBtn; public static int questionNr = 0; public static int currentQuestion = 1; public static int highScore = 0; @@ -55,7 +55,7 @@ public class GameGui implements GameGuiInterface { gbc.ipady = 100; gbc.insets = new Insets(20, 0, 0, 0); - RestartBtn = new JButton("Neustarten"); + LosingRestartBtn = new JButton("Neustarten"); ClosingBtn = new JButton("Schliessen"); LosingPanel = new JPanel(); @@ -67,9 +67,9 @@ public class GameGui implements GameGuiInterface { LosingLabel.setFont(new Font("Serif", Font.BOLD, 28)); LosingPanel.add(LosingLabel, gbc); - LosingPanel.add(RestartBtn, gbc); + LosingPanel.add(LosingRestartBtn, gbc); LosingPanel.add(ClosingBtn, gbc); - RestartBtn.addActionListener(new ActionHandler()); + LosingRestartBtn.addActionListener(new ActionHandler()); ClosingBtn.addActionListener(new ActionHandler()); gui.Frame.add(LosingPanel); } @@ -85,7 +85,7 @@ public class GameGui implements GameGuiInterface { gbc.ipady = 100; gbc.insets = new Insets(20, 0, 0, 0); - RestartBtn1 = new JButton("Nochmal Spielen"); + WinningRestartBtn = new JButton("Nochmal Spielen"); ClosingBtn = new JButton("Schliessen"); WinningPanel = new JPanel(); @@ -96,9 +96,9 @@ public class GameGui implements GameGuiInterface { WinningLabel.setFont(new Font("Serif", Font.BOLD, 34)); WinningPanel.add(WinningLabel, gbc); - WinningPanel.add(RestartBtn1, gbc); + WinningPanel.add(WinningRestartBtn, gbc); WinningPanel.add(ClosingBtn, gbc); - RestartBtn1.addActionListener(new ActionHandler()); + WinningRestartBtn.addActionListener(new ActionHandler()); ClosingBtn.addActionListener(new ActionHandler()); gui.Frame.add(WinningPanel); } diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index b7c28cf..e519c8c 100644 --- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -1,9 +1,9 @@ -C:\Users\ozan_\MiniGameProject\src\main\java\Gui\GuiInterface.java -C:\Users\ozan_\MiniGameProject\src\main\java\Gui\GameGuiInterface.java -C:\Users\ozan_\MiniGameProject\src\main\java\Gui\gui.java -C:\Users\ozan_\MiniGameProject\src\main\java\game\loadNextQuestion.java -C:\Users\ozan_\MiniGameProject\src\main\java\Gui\ActionHandler.java -C:\Users\ozan_\MiniGameProject\src\main\java\main.java -C:\Users\ozan_\MiniGameProject\src\main\java\game\runGame.java -C:\Users\ozan_\MiniGameProject\src\main\java\Gui\StartGameGui.java -C:\Users\ozan_\MiniGameProject\src\main\java\Gui\GameGui.java +C:\Users\Leon\MiniGameProject\src\main\java\Gui\ActionHandler.java +C:\Users\Leon\MiniGameProject\src\main\java\game\loadNextQuestion.java +C:\Users\Leon\MiniGameProject\src\main\java\Gui\GameGuiInterface.java +C:\Users\Leon\MiniGameProject\src\main\java\Gui\gui.java +C:\Users\Leon\MiniGameProject\src\main\java\game\runGame.java +C:\Users\Leon\MiniGameProject\src\main\java\main.java +C:\Users\Leon\MiniGameProject\src\main\java\Gui\StartGameGui.java +C:\Users\Leon\MiniGameProject\src\main\java\Gui\GameGui.java +C:\Users\Leon\MiniGameProject\src\main\java\Gui\GuiInterface.java diff --git a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst index 4d3e2e8..17c97ad 100644 --- a/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +++ b/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -1,3 +1,3 @@ -C:\Users\ozan_\MiniGameProject\src\test\java\Gui\GameGuiTest.java -C:\Users\ozan_\MiniGameProject\src\test\java\game\runGameTest.java -C:\Users\ozan_\MiniGameProject\src\test\java\Gui\guiTest.java +C:\Users\Leon\MiniGameProject\src\test\java\Gui\guiTest.java +C:\Users\Leon\MiniGameProject\src\test\java\Gui\GameGuiTest.java +C:\Users\Leon\MiniGameProject\src\test\java\game\runGameTest.java