Browse Source

refactoring: fix player can not die when attacking the guard

master
Yazan Alaamer 2 years ago
parent
commit
731936d12e
  1. 3
      src/main/java/game/StartDarkSoulsGame.java

3
src/main/java/game/StartDarkSoulsGame.java

@ -177,6 +177,9 @@ public class StartDarkSoulsGame {
+ "Guard fought back with sowrd of ashina " + "Guard fought back with sowrd of ashina "
+ "\n(you recieve 3 damage) "); + "\n(you recieve 3 damage) ");
playerHP = playerHP -3; playerHP = playerHP -3;
if (playerHP == 0) {
lose();
}
hpLabelNumber.setText(""+ playerHP); hpLabelNumber.setText(""+ playerHP);
choice1.setText(">"); choice1.setText(">");
choice2.setText(""); choice2.setText("");

Loading…
Cancel
Save