From ac0319c4e5bf46a1b0070c44d63edfb4e385f403 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Sat, 21 Jan 2023 00:05:08 +0100 Subject: [PATCH] added north location --- src/main/java/game/StartDarkSoulsGame.java | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 3084321..2541cf2 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -201,7 +201,7 @@ public class StartDarkSoulsGame { } public void north() { position= "north"; - mainTextArea.setText("You Are at Siofra River.\n is Water is blessed Drink it. \n ( + 2HP)"); + mainTextArea.setText("You Are at Siofra River.\n this Water is blessed Drink it. \n ( + 2HP)"); playerHP = playerHP +2; hpLabelNumber.setText(""+ playerHP); choice1.setText("GO south"); @@ -209,7 +209,17 @@ public class StartDarkSoulsGame { choice3.setText(""); choice4.setText(""); } - + public void east() { + position = "east"; + mainTextArea.setText("You are at forest of Ashina Depths.\n" + + " you just found a sword. \n (\nGracious Gift of Tears) "); + weapon = "Gift of Tears"; + weaponLabelName.setText(weapon); + choice1.setText(">"); + choice2.setText(""); + choice3.setText(""); + choice4.setText(""); + } public class TitelScreenHandler implements ActionListener{ public void actionPerformed(ActionEvent event) { @@ -242,7 +252,7 @@ public class StartDarkSoulsGame { case "crossRoad": switch(yourChoice) { case "c1": north(); break; - case "c2": break; + case "c2": east(); break; case "c3": townGate(); break; case "c4": break; } @@ -251,6 +261,13 @@ public class StartDarkSoulsGame { switch(yourChoice) { case "c1":crossRoad(); break; } + break; + case "east": + switch(yourChoice) { + case "c1": crossRoad(); + break; + } + break; } }