Skip to content
Snippets Groups Projects
Commit 6e61bbdf authored by Charlie Darques's avatar Charlie Darques
Browse files

Merge remote-tracking branch 'origin'

parents 9f54102f 8420a891
Branches
No related tags found
No related merge requests found
......@@ -94,5 +94,8 @@ public class Character implements Serializable {
public boolean isExhausted(){
return this.currentEnergy <= 0;
}
}
......@@ -72,16 +72,30 @@ public class Level{
Display.goToUserInput();
}
// affiche la jauge de vie de l'ennemi
public String displayEnnemyHealth() {
return this.ennemy.toString() + " - " + (int)this.ennemy.getCurrentHealth() +"/" + (int)this.ennemy.getMaxHealth();
// affiche la jauge de vie
public void displayLifePoints (){
System.err.println();
System.out.println("\t \t " +this.player.getName());
System.out.print(Terminal.GREEN+" \t current health "+Terminal.RESET);
for (int indice = 0; indice < ((this.player.getCurrentHealth()/this.player.getMaxHealth())*100)/2; indice ++){
System.out.print(Terminal.GREEN+ "▬"+ Terminal.RESET);
}
System.out.print(" ");
System.err.println( (int) this.player.getCurrentHealth() + "/" + (int) this.player.getMaxHealth());
System.out.print(Terminal.YELLOW+"\t current energy "+Terminal.RESET);
for (int indice = 0; indice < (this.player.getCurrentEnergy())/2; indice ++){
System.out.print(Terminal.YELLOW +"▬"+ Terminal.RESET);
}
System.out.print(" ");
System.err.println(this.player.getCurrentEnergy() + "/" + this.player.getMaxEnergy());
}
// affiche la jauge de vie du joueur
public String displayPlayerHealth() {
return (int)this.player.getCurrentHealth() +"/" + (int)this.player.getMaxHealth();
public String displayPlayerHealth(){
return (int )this.ennemy.getCurrentHealth() +" / " + (int) this.ennemy.getMaxHealth();
}
// annonce la mort de l'ennemi
public void ennemyDying() {
System.out.println("The ennemy is dead!");
......@@ -217,5 +231,5 @@ public class Level{
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment