Exemplo n.º 1
0
 public Dinosaur(string dinoType, DinoAttack dinoAttack)
 {
     this.dinoType   = dinoType;
     dinoHealth      = 100;
     energy          = 100;
     this.dinoAttack = dinoAttack;
 }
Exemplo n.º 2
0
 public Herd()
 {
     dinoType           = new List <Dinosaur>();
     DinosaurAttacks    = new DinoAttack[3];
     DinosaurAttacks[0] = new DinoAttack("chomp", 20);
     DinosaurAttacks[1] = new DinoAttack("stomp", 30);
     DinosaurAttacks[2] = new DinoAttack("rage", 50);
     dinoType.Add(new Dinosaur("raptor", PickAttack("raptor")));
     Console.Clear();
     dinoType.Add(new Dinosaur("trex", PickAttack("trex")));
     Console.Clear();
     dinoType.Add(new Dinosaur("triceratops", PickAttack("triceratops")));
     Console.WriteLine("This is a mighty Herd built from the strongest from each tribe!");
     Console.Clear();
 }