Personnages et plateaux BattleZone.
This commit is contained in:
parent
a430792085
commit
9de27803d9
24
src/Fabriques/Personnages/FabriquePersonnagesBattleZone.java
Normal file
24
src/Fabriques/Personnages/FabriquePersonnagesBattleZone.java
Normal file
@ -0,0 +1,24 @@
|
||||
package Fabriques.Personnages;
|
||||
|
||||
import Observateur.Organisation;
|
||||
import Person.Personnage;
|
||||
import Person.PersonnageBattleZone;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FabriquePersonnagesBattleZone extends FabriquePersonnagesAbstraite {
|
||||
@Override
|
||||
public ArrayList<Personnage> CreerPersonages(Organisation o) {
|
||||
ArrayList<Personnage> list = new ArrayList<Personnage>();
|
||||
|
||||
PersonnageBattleZone p1 = new PersonnageBattleZone(null, "P1");
|
||||
list.add(p1);
|
||||
PersonnageBattleZone p2 = new PersonnageBattleZone(null, "P2");
|
||||
list.add(p2);
|
||||
PersonnageBattleZone p3 = new PersonnageBattleZone(null, "P3");
|
||||
list.add(p3);
|
||||
PersonnageBattleZone p4 = new PersonnageBattleZone(null, "P4");
|
||||
list.add(p4);
|
||||
return list;
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package Fabriques.Plateau;
|
||||
|
||||
import Cases.CaseAbstraite;
|
||||
|
||||
abstract public class FabriquePlateauAbstraite {
|
||||
|
||||
public abstract void CreerPlateau();
|
||||
public abstract CaseAbstraite[][] CreerPlateau();
|
||||
}
|
||||
|
18
src/Fabriques/Plateau/FabriquePlateauBattleZone.java
Normal file
18
src/Fabriques/Plateau/FabriquePlateauBattleZone.java
Normal file
@ -0,0 +1,18 @@
|
||||
package Fabriques.Plateau;
|
||||
|
||||
import Cases.CaseAbstraite;
|
||||
import Cases.CaseColore;
|
||||
import utils.Constants;
|
||||
|
||||
public class FabriquePlateauBattleZone extends FabriquePlateauAbstraite {
|
||||
@Override
|
||||
public CaseAbstraite[][] CreerPlateau() {
|
||||
CaseAbstraite[][] plateau = new CaseAbstraite[Constants.TABLE_WIDTH][Constants.TABLE_HEIGHT];
|
||||
for (int ligne = 0; ligne < 10; ligne++) {
|
||||
for (int col = 0; col < 10; col++) {
|
||||
plateau[ligne][col] = new CaseColore(col, ligne);
|
||||
}
|
||||
}
|
||||
return plateau;
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
package Fabriques.Plateau;
|
||||
|
||||
public class FabriquePlateauMoyenAge extends FabriquePlateauAbstraite {
|
||||
@Override
|
||||
public void CreerPlateau() {
|
||||
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ import java.util.Random;
|
||||
public class PersonnageBattleZone extends Personnage {
|
||||
Color couleur;
|
||||
|
||||
protected PersonnageBattleZone(Organisation etatMajor, String nom) {
|
||||
public PersonnageBattleZone(Organisation etatMajor, String nom) {
|
||||
super(etatMajor, nom);
|
||||
|
||||
// Couleur Aléatoire
|
||||
|
@ -1,7 +1,14 @@
|
||||
|
||||
public class Constants {
|
||||
|
||||
/** Define the duration for a football game (in ms) */
|
||||
public static final int TIME_FOOTBALL_GAME = 100000; // 100 secondes
|
||||
|
||||
}
|
||||
package utils;
|
||||
|
||||
public class Constants {
|
||||
|
||||
/** Define the duration for a football game (in ms) */
|
||||
public static final int TIME_FOOTBALL_GAME = 100000; // 100 secondes
|
||||
|
||||
public static final int TABLE_HEIGHT = 10;
|
||||
|
||||
public static final int TABLE_WIDTH = 10;
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user