private static IKing KingSetter() { string kingName = Console.ReadLine(); IKing king = new King(kingName); string[] royalGuardUnits = Console.ReadLine().Split(); foreach (var unit in royalGuardUnits) { king.AddUnitToArmy(new RoyalGuard(unit)); } string[] footmanUnits = Console.ReadLine().Split(); foreach (var unit in footmanUnits) { king.AddUnitToArmy(new Footman(unit)); } return(king); }