Skip to content
Snippets Groups Projects
Commit fd3c9cff authored by rosier8u's avatar rosier8u
Browse files

ajout de string nom dans les different etat pour pouvoir les différencier

parent d9716855
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,10 @@ public class EtatActif implements Etat{ ...@@ -9,6 +9,10 @@ public class EtatActif implements Etat{
nom = "actif"; nom = "actif";
} }
public String getNom() {
return nom;
}
@Override @Override
public void actionTour(Personnage personnage) { public void actionTour(Personnage personnage) {
......
...@@ -10,6 +10,11 @@ public class EtatBlesse implements Etat{ ...@@ -10,6 +10,11 @@ public class EtatBlesse implements Etat{
this.nbTour = 2; this.nbTour = 2;
this.nom = "blesse"; this.nom = "blesse";
} }
public String getNom() {
return nom;
}
@Override @Override
public void actionTour(Personnage personnage) { public void actionTour(Personnage personnage) {
personnage.subir(5); personnage.subir(5);
......
...@@ -10,6 +10,11 @@ public class EtatEndormi implements Etat{ ...@@ -10,6 +10,11 @@ public class EtatEndormi implements Etat{
this.nbTour = 3; this.nbTour = 3;
this.nom = "endormi"; this.nom = "endormi";
} }
public String getNom() {
return nom;
}
@Override @Override
public void actionTour(Personnage personnage) { public void actionTour(Personnage personnage) {
nbTour --; nbTour --;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment