Constants file, Football Game & Referee
This commit is contained in:
parent
96d62d9a76
commit
22634a45c6
10
src/Comportements/ComportementSiffler.java
Normal file
10
src/Comportements/ComportementSiffler.java
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package Comportements;
|
||||||
|
|
||||||
|
public class ComportementSiffler implements ComportementEmmetreSon {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String emmetreSon() {
|
||||||
|
return "Coup de sifflet!!!!!!!";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
7
src/Constants.java
Normal file
7
src/Constants.java
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
public class Constants {
|
||||||
|
|
||||||
|
/** Define the duration for a football game (in ms) */
|
||||||
|
public static final int TIME_FOOTBALL_GAME = 100000; // 100 secondes
|
||||||
|
|
||||||
|
}
|
25
src/Fabriques/Personnages/FabriquePersonnagesFootball.java
Normal file
25
src/Fabriques/Personnages/FabriquePersonnagesFootball.java
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package Fabriques.Personnages;
|
||||||
|
|
||||||
|
import Observateur.Organisation;
|
||||||
|
import Person.Chevalier;
|
||||||
|
import Person.Fantasssin;
|
||||||
|
import Person.Personnage;
|
||||||
|
import Person.Princesse;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class FabriquePersonnagesFootball extends FabriquePersonnagesAbstraite {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<Personnage> CreerPersonages(Organisation o) {
|
||||||
|
Princesse p = new Princesse("Fiona");
|
||||||
|
Chevalier z = new Chevalier(o, "Zodiac");
|
||||||
|
Fantasssin f = new Fantasssin(o, "Fantastic");
|
||||||
|
|
||||||
|
ArrayList<Personnage> liste = new ArrayList<Personnage>();
|
||||||
|
liste.add(p);
|
||||||
|
liste.add(z);
|
||||||
|
liste.add(f);
|
||||||
|
return liste;
|
||||||
|
}
|
||||||
|
}
|
19
src/Person/Arbitre.java
Normal file
19
src/Person/Arbitre.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
package Person;
|
||||||
|
|
||||||
|
import Comportements.ComportementSiffler;
|
||||||
|
import Observateur.Organisation;
|
||||||
|
|
||||||
|
public class Arbitre extends Personnage {
|
||||||
|
|
||||||
|
protected Arbitre(Organisation etatMajor, String nom) {
|
||||||
|
super(etatMajor, nom);
|
||||||
|
//this.comportementCombat = new ComportementCombatAvecCheval();
|
||||||
|
this.comportementEmmetreSon = new ComportementSiffler();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNom() {
|
||||||
|
return "Arbitre de la rencontre: M." + this.nom + ".\nVeuillez respecter l'arbitre (lol.)";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user