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}"); } } }
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}"); } } }
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); } }
public void Push(IntelligentBeing N) { data.Add(N); counter++; }
public void Remove(IntelligentBeing A) { data.Remove(A); }