Browse Source

added north location

master
Yazan Alaamer 2 years ago
parent
commit
376fb1b627
  1. 18
      src/main/java/game/StartDarkSoulsGame.java

18
src/main/java/game/StartDarkSoulsGame.java

@ -199,6 +199,17 @@ public class StartDarkSoulsGame {
choice3.setText("Go south"); choice3.setText("Go south");
choice4.setText("Go West"); 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 class TitelScreenHandler implements ActionListener{
public void actionPerformed(ActionEvent event) { public void actionPerformed(ActionEvent event) {
@ -230,11 +241,16 @@ public class StartDarkSoulsGame {
break; break;
case "crossRoad": case "crossRoad":
switch(yourChoice) { switch(yourChoice) {
case "c1": break;
case "c1": north(); break;
case "c2": break; case "c2": break;
case "c3": townGate(); break; case "c3": townGate(); break;
case "c4": break; case "c4": break;
} }
break;
case "north":
switch(yourChoice) {
case "c1":crossRoad(); break;
}
} }
} }

Loading…
Cancel
Save