From e1b1d37acc374249e3a14dd92ca42feaa9a895bc Mon Sep 17 00:00:00 2001 From: Ozan-Can Ekinci Date: Tue, 10 Jan 2023 17:52:45 +0100 Subject: [PATCH] calling winningpanel after winning --- QandA/Answers.txt | 3 +-- QandA/Questions.txt | 3 +-- src/main/java/game/loadNextQuestion.java | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/QandA/Answers.txt b/QandA/Answers.txt index bc02b9c..ff9f986 100644 --- a/QandA/Answers.txt +++ b/QandA/Answers.txt @@ -1,5 +1,4 @@ right,wrong,wrong,wrong,1 wrong,right,wrong,wrong,2 wrong,wrong,right,wrong,3 -wrong,wrong,wrong,right,4 --,-,-,-,1 \ No newline at end of file +wrong,wrong,wrong,right,4 \ No newline at end of file diff --git a/QandA/Questions.txt b/QandA/Questions.txt index 1c7a207..dff34e0 100644 --- a/QandA/Questions.txt +++ b/QandA/Questions.txt @@ -1,5 +1,4 @@ test1 test2 test3 -test4 -test5 \ No newline at end of file +test4 \ No newline at end of file diff --git a/src/main/java/game/loadNextQuestion.java b/src/main/java/game/loadNextQuestion.java index bedc45d..e736c18 100644 --- a/src/main/java/game/loadNextQuestion.java +++ b/src/main/java/game/loadNextQuestion.java @@ -50,7 +50,10 @@ public class loadNextQuestion implements ActionListener { if (GameGui.questionNr != runGame.arrQuestions.length - 1) { runGame StartGame = new runGame(); StartGame.run(GameGui.questionNr); - } + } else { + GameGui gameWin = new GameGui (); + gameWin.createWinningPanel(); + } } }