Exemple #1
0
        private static void AddRoyalGuards(King king)
        {
            var rgNames = Console.ReadLine()
                          .Split(' ', StringSplitOptions.RemoveEmptyEntries);

            foreach (var name in rgNames)
            {
                var rg = new RoyalGuard(name);
                king.AddSlave(rg);
            }
        }
Exemple #2
0
        private static void AddFootmans(King king)
        {
            var footmansNames = Console.ReadLine()
                                .Split(' ', StringSplitOptions.RemoveEmptyEntries);

            foreach (var name in footmansNames)
            {
                var footman = new Footman(name);
                king.AddSlave(footman);
            }
        }