Exemplo n.º 1
0
 public static void OutNameSpecPower(int power, Army obj)
 {
     Console.WriteLine("\n\tOutput the name of the transformers of the specified power: ");
     for (int i = 0; i < obj.data.Count; i++)
     {
         A = obj.data.ElementAt(i);
         if (A.power == power)
         {
             Console.WriteLine($" Fighter's name -> { A.nameTrans}");
         }
     }
 }
Exemplo n.º 2
0
 public static void SearchByArmy(int year, Army obj)
 {
     Console.WriteLine("\n\tSearch combat unit by year of production(birth): ");
     for (int i = 0; i < obj.data.Count; i++)
     {
         coint++;
         A = obj.data.ElementAt(i);
         if (A.creationYear == year)
         {
             Console.WriteLine($"Fighting unit -> { A.nameTrans}");
         }
     }
 }
Exemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            IntelligentBeing a = obj as Man;

            if (a as Man == null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Exemplo n.º 4
0
 public void Push(IntelligentBeing N)
 {
     data.Add(N);
     counter++;
 }
Exemplo n.º 5
0
 public void Remove(IntelligentBeing A)
 {
     data.Remove(A);
 }