From 927cfe9d57f2468d8e1a0e49e2731c791e19fa69 Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Fri, 20 Jan 2023 23:53:00 +0100 Subject: [PATCH] added cross Road location --- src/main/java/game/StartDarkSoulsGame.java | 27 +++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 5032638..e9f32e4 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -191,6 +191,14 @@ public class StartDarkSoulsGame { choice4.setText(""); } + public void crossRoad() { + position= "crossRoad"; + mainTextArea.setText("You ar at the Undead Settlement.\n if you go south you will go back to the town"); + choice1.setText("GO north"); + choice2.setText("Go east"); + choice3.setText("Go south"); + choice4.setText("Go West"); + } public class TitelScreenHandler implements ActionListener{ public void actionPerformed(ActionEvent event) { @@ -206,7 +214,7 @@ public class StartDarkSoulsGame { switch(yourChoice) { case "c1": talkGuard(); break; case "c2": attackGuard(); break; - case "c3": break; + case "c3": crossRoad(); break; } break; case "talkGuard": @@ -214,14 +222,21 @@ public class StartDarkSoulsGame { case"c1": townGate();break; } break; - case "attackGuard":// commit (26) attack guard - switch(yourChoice) {// commit (26) attack guard - case "c1": townGate();// commit (26) attack guard - break;// commit (26) attack guard + case "attackGuard": + switch(yourChoice) { + case "c1": townGate(); + break; } break; + case "crossRoad": + switch(yourChoice) { + case "c1": break; + case "c2": break; + case "c3": townGate(); break; + case "c4": break; + } } } -} + } }