From 7a26cc4b443ee4d9d7ef4e719ca28f50805f2ff6 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Sat, 21 Jan 2023 00:25:51 +0100 Subject: [PATCH] create win methode --- src/main/java/game/StartDarkSoulsGame.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index f22ccd8..8411c45 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -35,7 +35,7 @@ public class StartDarkSoulsGame { String position; String weapon; int monsterHP; - + int AshuraRing; public StartDarkSoulsGame() { gui.Frame.setSize(800, 600); gui.Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); @@ -258,6 +258,16 @@ public class StartDarkSoulsGame { choice4.setText(""); } + public void win() { + position = "win"; + mainTextArea.setText("THE SOUl OF CINDER has been defeated.\n" + + "(item dropped: Ashera Ring "); + AshuraRing = 1; + choice1.setText("Go east"); + choice2.setText(""); + choice3.setText(""); + choice4.setText(""); + } public class TitelScreenHandler implements ActionListener{ public void actionPerformed(ActionEvent event) { @@ -265,6 +275,7 @@ public class StartDarkSoulsGame { } } + public class ChoiceHandler implements ActionListener{ public void actionPerformed(ActionEvent event) { String yourChoice = event.getActionCommand();