private static bool ChooseClass(int classToUse) { bool res = false; switch (classToUse) { case 1: list = new AList0(); res = true; break; case 2: list = new AList1(); res = true; break; case 3: list = new AList2(); res = true; break; default: Console.WriteLine("There is no such class!"); break; } return(res); }
public void InitComponent() { WorldGenerator generator = new WorldGenerator(); var world = generator.GenerateWorldTerrain(); generator.Populate(world); resolver.World = world; World = world; //Terrain initialisé foreach (Rabbit r in world.Agents.Where(i => i is Rabbit).Cast <Rabbit>()) { IAList.Add(new RabbitIA(r)); } StartScheduler(); }
private static bool ChooseClass(int classToUse) { bool res = false; switch (classToUse) { case 1: list = new AList0(); res = true; break; case 2: list = new AList1(); res = true; break; case 3: list = new AList2(); res = true; break; default: Console.WriteLine("There is no such class!"); break; } return res; }