Case courrante d'un personnage.
This commit is contained in:
parent
d44d45155a
commit
c847b7e82e
@ -1,8 +1,11 @@
|
||||
package Cases;
|
||||
|
||||
import Person.Personnage;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public abstract class CaseAbstraite {
|
||||
Personnage occupant;
|
||||
|
||||
HashMap<PointsCardinaux, CaseAbstraite> voisins;
|
||||
|
||||
@ -13,9 +16,15 @@ public abstract class CaseAbstraite {
|
||||
|
||||
// peupler ici ?
|
||||
voisins = new HashMap<PointsCardinaux, CaseAbstraite>();
|
||||
|
||||
occupant = null;
|
||||
}
|
||||
|
||||
public void ajouterVoisin(PointsCardinaux p, CaseAbstraite c) {
|
||||
voisins.put(p, c);
|
||||
}
|
||||
|
||||
public void ajouterOccupant(Personnage occ) {
|
||||
this.occupant = occ;
|
||||
}
|
||||
}
|
@ -13,6 +13,6 @@ public class Fantasssin extends Personnage {
|
||||
|
||||
@Override
|
||||
public String getNom() {
|
||||
return "Seraffin " + this.nom + ". A vos ordres";
|
||||
return "Séraphin " + this.nom + ". A vos ordres";
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package Person;
|
||||
|
||||
import Cases.CaseAbstraite;
|
||||
import Comportements.ComportementCombat;
|
||||
import Comportements.ComportementEmmetreSon;
|
||||
import Composition.PersonnagesAbstraits;
|
||||
@ -7,6 +8,7 @@ import Observateur.ObservateurAbstrait;
|
||||
import Observateur.Organisation;
|
||||
|
||||
public class Personnage extends PersonnagesAbstraits implements ObservateurAbstrait {
|
||||
protected CaseAbstraite caseCourante;
|
||||
protected String nom;
|
||||
protected ComportementCombat comportementCombat;
|
||||
protected ComportementEmmetreSon comportementEmmetreSon;
|
||||
@ -64,4 +66,12 @@ public class Personnage extends PersonnagesAbstraits implements ObservateurAbstr
|
||||
}
|
||||
return etat;
|
||||
}
|
||||
|
||||
public CaseAbstraite getCaseCourante() {
|
||||
return caseCourante;
|
||||
}
|
||||
|
||||
public void setCaseCourante(CaseAbstraite caseCourante) {
|
||||
this.caseCourante = caseCourante;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user