private static void FillList(List <Soldier> soldiers, string[] parts) { switch (parts[0]) { case "Private": soldiers.Add(Private.Create(parts)); break; case "LieutenantGeneral": soldiers.Add(LieutenantGeneral.Create(parts, soldiers)); break; case "Engineer": soldiers.Add(Engineer.Create(parts)); break; case "Commando": soldiers.Add(Commando.Create(parts)); break; case "Spy": soldiers.Add(Spy.Create(parts)); break; default: break; } }