Exemple #1
0
 public void ReplaceNuisible(Nuisible toReplace, Nuisible replacement)
 {
     if (this.Nuisibles.Remove(toReplace))
     {
         this.Nuisibles.Add(replacement);
     }
     ;
 }
Exemple #2
0
 public RandomMovingStrategy(Nuisible nuisible)
 {
     this._nuisible = nuisible;
     Console.WriteLine(this._nuisible);
 }
Exemple #3
0
 public PeacefulMovingStrategy(Nuisible nuisible)
 {
     _nuisible = nuisible;
 }
Exemple #4
0
 public override string ToString()
 {
     return(Nuisible.ToString());
 }
Exemple #5
0
 public override void Zombify()
 {
     Nuisible.Zombify();
 }
Exemple #6
0
 public override void GetCollided(ICollideable collider)
 {
     Nuisible.GetCollided(collider);
 }
Exemple #7
0
 public override void Collide(ICollideable collided)
 {
     Nuisible.Collide(collided);
 }
Exemple #8
0
 public NuisibleDecorator(Nuisible nuisible)
 {
     this.Nuisible = nuisible;
 }