Example #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();
 }
Example #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();
        }
Example #3
0
 public BoutDeTerrain(string nom, CoordonneesAbstrait position)
 {
     this.Nom       = nom;
     PersonnageList = new List <PersonnageAbstrait>();
     ObjetList      = new List <ObjetAbstrait>();
     this.Position  = position;
 }
Example #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");
 }
Example #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");
 }
Example #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);
 }
Example #7
0
 public abstract ZoneAbstrait CreerZone(string nom, CoordonneesAbstrait position);
Example #8
0
 public Oeuf(string nom, CoordonneesAbstrait position)
 {
     this.Nom      = nom;
     this.Age      = 0;
     this.Position = position;
 }
Example #9
0
 public override ZoneAbstrait CreerZone(string nom, CoordonneesAbstrait position)
 {
     return(new BoutDeTerrain(nom, position));
 }
Example #10
0
 public abstract ObjetAbstrait CreerNourriture(string nom, CoordonneesAbstrait position);
Example #11
0
 public abstract ObjetAbstrait CreerOeuf(string nom, CoordonneesAbstrait position);
Example #12
0
 public abstract PersonnageAbstrait CreerReine(string nom, CoordonneesAbstrait position);
Example #13
0
 public override ObjetAbstrait CreerNourriture(string nom, CoordonneesAbstrait position)
 {
     return(new Nourriture(nom, position));
 }
Example #14
0
 public override ObjetAbstrait CreerOeuf(string nom, CoordonneesAbstrait position)
 {
     return(new Oeuf(nom, position));
 }
Example #15
0
 public MorceauNourriture(string nom, CoordonneesAbstrait position)
 {
     this.Nom      = nom;
     this.Position = position;
 }
Example #16
0
 public abstract PersonnageAbstrait CreerOuvriere(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionReine);
Example #17
0
 public abstract PersonnageAbstrait CreerPrincesse(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionReine);
Example #18
0
 public override ObjetAbstrait CreerPheromone(string nom, CoordonneesAbstrait position)
 {
     return(new Pheromone(nom, position));
 }
Example #19
0
 public abstract PersonnageAbstrait CreerTermite(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionFourmilliere);
Example #20
0
 public override PersonnageAbstrait CreerReine(string nom, CoordonneesAbstrait position)
 {
     return(Reine.Instance(nom, position));
 }
Example #21
0
 public abstract ObjetAbstrait CreerPheromone(string nom, CoordonneesAbstrait position);
Example #22
0
 public override PersonnageAbstrait CreerGuerriere(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionReine)
 {
     return(new Guerriere(nom, position, positionReine));
 }
Example #23
0
 public override PersonnageAbstrait CreerTermite(string nom, CoordonneesAbstrait position, CoordonneesAbstrait positionFourmilliere)
 {
     return(new Termite(nom, position, positionFourmilliere));
 }
Example #24
0
 public Pheromone(string nom, CoordonneesAbstrait position)
 {
     this.Nom      = nom;
     this.Position = position;
     this.Dureevie = DureeVieOriginale;
 }