static void Main(string[] args) { List <IHighSchooler> student = new List <IHighSchooler>(); List <IMechPilot> s = new List <IMechPilot>(); for (int i = 0; i < 2; i++) { Protaginist protaginist = new Protaginist(); SadTwist sadtwist = new SadTwist(); student.Add(protaginist); student.Add(sadtwist); } for (int i = 0; i < 2; i++) { Protaginist protaginist = new Protaginist(); SadTwist sadtwist = new SadTwist(); } for (int a = 0; a < 1; a++) { foreach (IHighSchooler i in student) { i.grade(); } } foreach (IMechPilot a in s) { a.attack(); a.defence(); } Console.ReadLine(); }
static void Main(string[] args) { List<IHighSchooler> student = new List<IHighSchooler>(); List<IMechPilot> s = new List<IMechPilot>(); for(int i = 0; i <2; i++) { Protaginist protaginist = new Protaginist(); SadTwist sadtwist = new SadTwist(); student.Add(protaginist); student.Add(sadtwist); } for (int i = 0; i < 2; i++) { Protaginist protaginist = new Protaginist(); SadTwist sadtwist = new SadTwist(); } for (int a = 0; a < 1; a++) foreach (IHighSchooler i in student) { i.grade(); } foreach (IMechPilot a in s) { a.attack(); a.defence(); } Console.ReadLine(); }
static void Main(string[] args) { Protaginist sitsByWindow = new Protaginist("AIE", 1, "Monster", 10, 10); SadTwist childFriend = new SadTwist("AIE", 1, 12); bool yes = childFriend.SenpaiNotice(sitsByWindow); string hey = sitsByWindow.ItsaAngel(childFriend); Console.WriteLine(yes.ToString()); Console.WriteLine(hey); Console.Read(); }