Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the Bird class.
 /// </summary>
 /// <param name="name">The name of the animal.</param>
 /// <param name="age">The age of the animal.</param>
 /// <param name="weight">The weight of the animal (in pounds).</param>
 /// /// <param name="gender">The Bird's gender.</param>
 public Bird(string name, int age, double weight, Gender gender)
     : base(name, age, weight, gender)
 {
     this.MoveBehavior      = MoveBehaviorFactory.CreateMoveBehavior(MoveBehaviorType.Fly);
     this.EatBehavior       = EatBehaviorFactory.CreateEatBehavior(EatBehaviorType.Consume);
     this.ReproduceBehavior = ReproduceBehaviorFactory.CreateReproduceBehavior(ReproduceBehaviorType.LayEggs);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the Mammal class.
 /// </summary>
 /// <param name="name">The name of the animal.</param>
 /// <param name="age">The age of the animal.</param>
 /// <param name="weight">The weight of the animal (in pounds).</param>
 /// /// <param name="gender">The Mammal's gender.</param>
 public Mammal(string name, int age, double weight, Gender gender)
     : base(name, age, weight, gender)
 {
     this.MoveBehavior      = MoveBehaviorFactory.CreateMoveBehavior(MoveBehaviorType.Pace);
     this.EatBehavior       = EatBehaviorFactory.CreateEatBehavior(EatBehaviorType.Consume);
     this.ReproduceBehavior = ReproduceBehaviorFactory.CreateReproduceBehavior(ReproduceBehaviorType.GiveBirth);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the Platypus class.
        /// </summary>
        /// <param name="name">The name of the animal.</param>
        /// <param name="age">The age of the animal.</param>
        /// <param name="weight">The weight of the animal (in pounds).</param>
        /// /// <param name="gender">The Platypus's gender.</param>
        public Platypus(string name, int age, double weight, Gender gender)
            : base(name, age, weight, gender)
        {
            this.BabyWeightPercentage = 12.0;

            this.MoveBehavior      = MoveBehaviorFactory.CreateMoveBehavior(MoveBehaviorType.Swim);
            this.EatBehavior       = EatBehaviorFactory.CreateEatBehavior(EatBehaviorType.ShowAffection);
            this.ReproduceBehavior = ReproduceBehaviorFactory.CreateReproduceBehavior(ReproduceBehaviorType.LayEggs);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the Dingo class.
 /// </summary>
 /// <param name="name">The name of the animal.</param>
 /// <param name="age">The age of the animal.</param>
 /// <param name="weight">The weight of the animal (in pounds).</param>
 /// /// <param name="gender">The Dingo's gender.</param>
 public Dingo(string name, int age, double weight, Gender gender)
     : base(name, age, weight, gender)
 {
     this.BabyWeightPercentage = 10.0;
     this.EatBehavior          = EatBehaviorFactory.CreateEatBehavior(EatBehaviorType.BuryAndEatBone);
 }