LesSyms4/src/SimulationJeu.java

52 lines
1.3 KiB
Java
Raw Normal View History

2014-12-03 08:13:23 +00:00
import Fabriques.Scenario.FabriqueScenarioAbstraite;
import Observateur.Organisation;
import Person.Personnage;
import Person.eMode;
2014-10-03 13:34:03 +00:00
import java.util.ArrayList;
public class SimulationJeu {
ArrayList<Personnage> liste;
2014-10-03 15:20:49 +00:00
Organisation o;
2014-12-03 08:13:23 +00:00
FabriqueScenarioAbstraite f;
2014-10-03 13:34:03 +00:00
2014-12-03 08:13:23 +00:00
public SimulationJeu(FabriqueScenarioAbstraite fb) {
f = fb;
2014-10-03 13:34:03 +00:00
liste = new ArrayList<Personnage>();
}
public String afficheTous() {
StringBuilder result = new StringBuilder();
for(Personnage p: liste) {
result.append(p.getNom());
result.append(System.getProperty("line.separator"));
}
return result.toString();
}
public void creationPersonnages() {
2014-12-03 08:13:23 +00:00
o = new Organisation();
liste = f.CreerPersonnages(o);
2014-10-03 13:34:03 +00:00
}
public String emmetreUnSonTous() {
StringBuilder result = new StringBuilder();
for (Personnage p: liste) {
result.append(System.getProperty("line.separator"));
}
return result.toString();
}
public String lancerCombar() {
StringBuilder result = new StringBuilder();
for (Personnage p: liste) {
result.append(System.getProperty("line.separator"));
}
return result.toString();
}
2014-10-03 15:20:49 +00:00
public void changerEtat(eMode etat) {
this.o.setModeFonctionnement(etat);
}
2014-10-03 13:34:03 +00:00
}