objet et decorateur
This commit is contained in:
5
src/Etats/EEtat.java
Normal file
5
src/Etats/EEtat.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package Etats;
|
||||
|
||||
public enum EEtat {
|
||||
EtatOK,EtatKO
|
||||
}
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user