From 376fb1b6279747d41754e5ae8b7d239d80d89412 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Fri, 20 Jan 2023 23:57:38 +0100 Subject: [PATCH] added north location --- src/main/java/game/StartDarkSoulsGame.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index e9f32e4..3084321 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -199,6 +199,17 @@ public class StartDarkSoulsGame { choice3.setText("Go south"); choice4.setText("Go West"); } + public void north() { + position= "north"; + mainTextArea.setText("You Are at Siofra River.\n is Water is blessed Drink it. \n ( + 2HP)"); + playerHP = playerHP +2; + hpLabelNumber.setText(""+ playerHP); + choice1.setText("GO south"); + choice2.setText(""); + choice3.setText(""); + choice4.setText(""); + } + public class TitelScreenHandler implements ActionListener{ public void actionPerformed(ActionEvent event) { @@ -230,13 +241,18 @@ public class StartDarkSoulsGame { break; case "crossRoad": switch(yourChoice) { - case "c1": break; + case "c1": north(); break; case "c2": break; case "c3": townGate(); break; case "c4": break; } + break; + case "north": + switch(yourChoice) { + case "c1":crossRoad(); break; + } } - } + } - } + } }