Exemplo n.º 1
0
 public Nourriture(string nom, CoordonneesAbstrait position)
 {
     this.Nom          = nom;
     this.Position     = position;
     this.Dureevie     = DureeVieOriginale;
     this.ListMorceaux = Enumerable.Repeat(new MorceauNourriture(String.Format("Un morceau de {0}", Nom), Position), MORCEAU_NOURRITURE).ToList();
 }
Exemplo n.º 2
0
        public Fourmiliere(int _dimensionX, int _dimensionY)
        {
            TitreApplication = "Simulateur fourmilière ALAP";
            vitesse          = 200;

            this.DimensionX     = _dimensionX;
            this.DimensionY     = _dimensionY;
            Fabrique            = new FabriqueFourmiliere();
            PersonnagesList     = new ObservableCollection <PersonnageAbstrait>();
            PersonnagesMortList = new ObservableCollection <PersonnageAbstrait>();
            coordMaison         = Fabrique.CreerPosition(10, 10);
            AjouterReine();
            //PersonnagesList.Add(Fabrique.CreerGuerriere("Guerriere 0"));
            //PersonnagesList.Add(Fabrique.CreerOuvriere("Ouvriere 0", Fabrique.CreerPosition(10, 10)));
            //PersonnagesList.Add(Fabrique.CreerTermite("Termite 0"));
            //PersonnagesList.Add(Fabrique.CreerTermite(String.Format("Termite {0}", PersonnagesList.Count), Fabrique.CreerPosition(3, 3), Fabrique.CreerPosition(positionX, positionY)));

            ListObservateur = new List <PersonnageAbstrait>();
            ObjetList       = new ObservableCollection <ObjetAbstrait>();
            ZoneList        = new ObservableCollection <ZoneAbstrait>();

            meteo = new Meteo();
            meteo.ListObservateur = new List <PersonnageAbstrait>();
            //place des morceaux de nourriture sous la reine pour qu'elle puisse pondre dès le début...
            //plus besoin de faire spawn de fourmis
            for (int i = 0; i < 50; i++)
            {
                ObjetList.Add(new MorceauNourriture("Morceau N°" + i, Fabrique.CreerPosition(10, 10)));
            }
            InitZones();
        }
Exemplo n.º 3
0
 public BoutDeTerrain(string nom, CoordonneesAbstrait position)
 {
     this.Nom       = nom;
     PersonnageList = new List <PersonnageAbstrait>();
     ObjetList      = new List <ObjetAbstrait>();
     this.Position  = position;
 }
Exemplo n.º 4
0
 public Termite(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionFourmilliere)
 {
     this.Nom         = nom;
     this.PV          = HPNaissance;
     this.Position    = position;
     this.Maison      = positionFourmilliere;
     ListEtape        = new ObservableCollection <EtapeAbstraite>();
     zone             = new BoutDeTerrain("default", position);
     StategieCourante = new Attaque("Attaque");
 }
Exemplo n.º 5
0
 public Princesse(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionReine)
 {
     this.Nom         = nom;
     this.PV          = HPNaissance;
     this.Position    = position;
     this.Maison      = positionReine;
     ListEtape        = new ObservableCollection <EtapeAbstraite>();
     zone             = new BoutDeTerrain("default", position);
     StategieCourante = new Normal("Normal");
 }
Exemplo n.º 6
0
 public static Reine Instance(string nom, CoordonneesAbstrait position)
 {
     if (instance == null)
     {
         instance = new Reine();
     }
     instance.Nom              = nom;
     instance.PV               = HPNaissance;
     instance.Position         = position;
     instance.Maison           = new Coordonnees();
     instance.Maison.X         = position.X;
     instance.Maison.Y         = position.Y;
     instance.ListEtape        = new ObservableCollection <EtapeAbstraite>();
     instance.zone             = new BoutDeTerrain("default", position);
     instance.StategieCourante = new Immobile("Immobile");
     instance.morceaux         = new List <ObjetAbstrait>();
     return(instance);
 }
Exemplo n.º 7
0
 public abstract ZoneAbstrait CreerZone(string nom, CoordonneesAbstrait position);
Exemplo n.º 8
0
 public Oeuf(string nom, CoordonneesAbstrait position)
 {
     this.Nom      = nom;
     this.Age      = 0;
     this.Position = position;
 }
Exemplo n.º 9
0
 public override ZoneAbstrait CreerZone(string nom, CoordonneesAbstrait position)
 {
     return(new BoutDeTerrain(nom, position));
 }
Exemplo n.º 10
0
 public abstract ObjetAbstrait CreerNourriture(string nom, CoordonneesAbstrait position);
Exemplo n.º 11
0
 public abstract ObjetAbstrait CreerOeuf(string nom, CoordonneesAbstrait position);
Exemplo n.º 12
0
 public abstract PersonnageAbstrait CreerReine(string nom, CoordonneesAbstrait position);
Exemplo n.º 13
0
 public override ObjetAbstrait CreerNourriture(string nom, CoordonneesAbstrait position)
 {
     return(new Nourriture(nom, position));
 }
Exemplo n.º 14
0
 public override ObjetAbstrait CreerOeuf(string nom, CoordonneesAbstrait position)
 {
     return(new Oeuf(nom, position));
 }
Exemplo n.º 15
0
 public MorceauNourriture(string nom, CoordonneesAbstrait position)
 {
     this.Nom      = nom;
     this.Position = position;
 }
Exemplo n.º 16
0
 public abstract PersonnageAbstrait CreerOuvriere(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionReine);
Exemplo n.º 17
0
 public abstract PersonnageAbstrait CreerPrincesse(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionReine);
Exemplo n.º 18
0
 public override ObjetAbstrait CreerPheromone(string nom, CoordonneesAbstrait position)
 {
     return(new Pheromone(nom, position));
 }
Exemplo n.º 19
0
 public abstract PersonnageAbstrait CreerTermite(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionFourmilliere);
Exemplo n.º 20
0
 public override PersonnageAbstrait CreerReine(string nom, CoordonneesAbstrait position)
 {
     return(Reine.Instance(nom, position));
 }
Exemplo n.º 21
0
 public abstract ObjetAbstrait CreerPheromone(string nom, CoordonneesAbstrait position);
Exemplo n.º 22
0
 public override PersonnageAbstrait CreerGuerriere(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionReine)
 {
     return(new Guerriere(nom, position, positionReine));
 }
Exemplo n.º 23
0
 public override PersonnageAbstrait CreerTermite(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionFourmilliere)
 {
     return(new Termite(nom, position, positionFourmilliere));
 }
Exemplo n.º 24
0
 public Pheromone(string nom, CoordonneesAbstrait position)
 {
     this.Nom      = nom;
     this.Position = position;
     this.Dureevie = DureeVieOriginale;
 }