objet et decorateur

This commit is contained in:
CCAZOT
2015-01-22 19:08:47 +01:00
parent a795db4f6e
commit 2e1eafcc77
16 changed files with 220 additions and 59 deletions

5
src/Etats/EEtat.java Normal file
View File

@@ -0,0 +1,5 @@
package Etats;
public enum EEtat {
EtatOK,EtatKO
}

View File

@@ -1,5 +1,12 @@
package Etats;
public abstract class EtatPersonnageAbstrait {
import Person.Personnage;
public abstract class EtatPersonnageAbstrait {
protected Personnage joueur;
protected EtatPersonnageAbstrait(Personnage perso){
this.joueur = perso;
}
}

View File

@@ -1,5 +1,12 @@
package Etats;
import Person.Personnage;
public class EtatPersonnageKO extends EtatPersonnageAbstrait {
public EtatPersonnageKO(Personnage perso) {
super(perso);
// TODO Auto-generated constructor stub
}
}

View File

@@ -1,5 +1,12 @@
package Etats;
import Person.Personnage;
public class EtatPersonnageOK extends EtatPersonnageAbstrait {
public EtatPersonnageOK(Personnage perso) {
super(perso);
// TODO Auto-generated constructor stub
}
}