Browse Source

create win methode

master
Yazan Alaamer 2 years ago
parent
commit
7a26cc4b44
  1. 13
      src/main/java/game/StartDarkSoulsGame.java

13
src/main/java/game/StartDarkSoulsGame.java

@ -35,7 +35,7 @@ public class StartDarkSoulsGame {
String position;
String weapon;
int monsterHP;
int AshuraRing;
public StartDarkSoulsGame() {
gui.Frame.setSize(800, 600);
gui.Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@ -258,6 +258,16 @@ public class StartDarkSoulsGame {
choice4.setText("");
}
public void win() {
position = "win";
mainTextArea.setText("THE SOUl OF CINDER has been defeated.\n"
+ "(item dropped: Ashera Ring ");
AshuraRing = 1;
choice1.setText("Go east");
choice2.setText("");
choice3.setText("");
choice4.setText("");
}
public class TitelScreenHandler implements ActionListener{
public void actionPerformed(ActionEvent event) {
@ -265,6 +275,7 @@ public class StartDarkSoulsGame {
}
}
public class ChoiceHandler implements ActionListener{
public void actionPerformed(ActionEvent event) {
String yourChoice = event.getActionCommand();

Loading…
Cancel
Save