From f01d481678ec98f9dfbf0183d2774c9145fb173f Mon Sep 17 00:00:00 2001 From: Yazan Alaamer Date: Fri, 20 Jan 2023 21:59:24 +0100 Subject: [PATCH] set guard answers --- src/main/java/game/StartDarkSoulsGame.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/game/StartDarkSoulsGame.java b/src/main/java/game/StartDarkSoulsGame.java index 1fa2408..0d73f5f 100644 --- a/src/main/java/game/StartDarkSoulsGame.java +++ b/src/main/java/game/StartDarkSoulsGame.java @@ -31,6 +31,7 @@ public class StartDarkSoulsGame { Container con; TitelScreenHandler tsHandler= new TitelScreenHandler(); int playerHP ; + String position; String weapon; public StartDarkSoulsGame() { @@ -152,13 +153,21 @@ public class StartDarkSoulsGame { townGate(); } public void townGate() { + position = "twonGate"; mainTextArea.setText("You are at the Gate of the town.\n A guard is standing in front of you. WHAT DO YOU DO !?"); choice1.setText("Talk to the gurad "); choice2.setText("Attack the guard"); choice3.setText("Leave"); choice4.setText(""); } - + public void talkGuard() { + position="talkGuard"; + mainTextArea.setText("Guard: Hallo stranger. i have never seen your face. I'm sorry but we can not let a stranger enter our town"); + choice1.setText(">"); + choice2.setText(""); + choice3.setText(""); + choice4.setText(""); + } public class TitelScreenHandler implements ActionListener{ public void actionPerformed(ActionEvent event) { createGameScreen();