예제 #1
0
        static void Main(string[] args)
        {
            countOofPresents = int.Parse(Console.ReadLine());
            int  size      = int.Parse(Console.ReadLine());
            bool santaGoes = false;

            MakeNeighbourhood(size);
            santa = neighbourhood.Position('S');

            while (true)
            {
                string command = Console.ReadLine();
                if (command == "Christmas morning")
                {
                    break;
                }
                if (countOofPresents <= 0)
                {
                    santaGoes = true;
                    break;
                }

                SantaAction(command);
            }

            int niceKitd = neighbourhood.CheckNiceKid();

            if (santaGoes)
            {
                Console.WriteLine("Santa ran out of presents!");
            }

            PrintNeighbourhood();
            if (niceKitd == 0)
            {
                Console.WriteLine($"Good job, Santa! {niceKids} happy nice kid/s.");
            }
            else
            {
                Console.WriteLine($"No presents for {niceKitd} nice kid/s.");
            }
        }