public override void AjouteObjet(ObjetAbstrait obj)
 {
     if (!ObjectsList.Contains(obj))
     {
         ObjectsList.Add(obj);
     }
 }
Example #2
0
 public virtual void PrendreObjet(ObjetAbstrait unObjet)
 {
     if (fourmi.Position.X == unObjet.PositionObjet.X && fourmi.Position.Y == unObjet.PositionObjet.Y)
     {
         fourmi.LstObjets.Add(unObjet);
     }
 }
Example #3
0
 protected override bool TestEgaliteObjet(ObjetAbstrait obj, Coordonnees coor)
 {
     if (coor.Equals(obj.Case))
     {
         return(true);
     }
     return(false);
 }
 public override void SetObjectToObserve(ObjetAbstrait obj)
 {
     if (obj == null) Walkable = true;
     else if ((obj is SpawnPoint) || (obj is GatherPoint))
         Walkable = false;
     else
         Walkable = true;
     base.SetObjectToObserve(obj);
 }
Example #5
0
        public PheromoneActive getPheromone()
        {
            for (int i = 0; i < ObjetsList.Count; i++)
            {
                ObjetAbstrait ph = ObjetsList[i];

                if (ph.GetType() is PheromoneActive || ph.GetType() == typeof(PheromoneBas) || ph.GetType() == typeof(PheromoneHaut) || ph.GetType() == typeof(PheromoneGauche) || ph.GetType() == typeof(PheromoneDroite))
                {
                    return((PheromoneActive)ph);
                }
            }

            return(null);
        }
 public override void SetObjectToObserve(ObjetAbstrait obj)
 {
     if (obj == null)
     {
         Walkable = true;
     }
     else if ((obj is SpawnPoint) || (obj is GatherPoint))
     {
         Walkable = false;
     }
     else
     {
         Walkable = true;
     }
     base.SetObjectToObserve(obj);
 }
Example #7
0
 public void AjouteObjet(ObjetAbstrait unObjet)
 {
     ObjetsList.Add(unObjet);
 }
 public abstract void AjouteObjet(ObjetAbstrait obj);
 public override void PrendreObjet(ObjetAbstrait unObjet)
 {
     fourmi.LstObjets.Add(unObjet);
 }
Example #10
0
        protected virtual bool TestEgaliteObjet(ObjetAbstrait obj, Coordonnees coor)
        {
            return(false);
//            if (coor.Equals(obj.Case)) return true;
//            return false;
        }
Example #11
0
 public override void AjoutePheromone(ObjetAbstrait unPheromone)
 {
     this.ObjetList.Add(unPheromone);
 }
Example #12
0
 public override void AjouteOeuf(ObjetAbstrait unOeuf)
 {
     this.ObjetList.Add(unOeuf);
 }
Example #13
0
 public virtual ObjetAbstrait ContientObjet(ObjetAbstrait unObjet, ZoneAbstraite uneZone)
 {
     throw new NotImplementedException();
 }
Example #14
0
 public override void AjouteObjet(ObjetAbstrait obj)
 {
     ObjectsList.Add(obj);
 }
 public override void AjouteObjet(ObjetAbstrait unObjet)
 {
     ObjetAbstraitList.Add(unObjet);
 }
 protected virtual bool TestEgaliteObjet(ObjetAbstrait obj, Coordonnees coor)
 {
     return false;
     //            if (coor.Equals(obj.Case)) return true;
     //            return false;
 }
 protected override bool TestEgaliteObjet(ObjetAbstrait obj, Coordonnees coor)
 {
     if (coor.Equals(obj.Case)) return true;
     return false;
 }
Example #18
0
 public override void PrendreObjet(ObjetAbstrait unObjet)
 {
     base.PrendreObjet(unObjet);
 }
Example #19
0
 public abstract void AjouteOeuf(ObjetAbstrait unObject);
Example #20
0
 public abstract void AjoutePheromone(ObjetAbstrait unObject);
Example #21
0
 public virtual void SetObjectToObserve(ObjetAbstrait obj)
 {
     ObjectToObserve = obj;
     Update();
 }