Esempio n. 1
0
        static void RunBotCleanLarge()
        {
            var temp = Console.ReadLine();

            String[] positions = temp.Split(' ');
            var      position  = new int[2];

            for (var i = 0; i < 2; i++)
            {
                position[i] = Convert.ToInt32(positions[i]);
            }
            String[] dimensions = Console.ReadLine().Split(' ');
            var      dimension  = new int[2];

            for (var i = 0; i < 2; i++)
            {
                dimension[i] = Convert.ToInt32(dimensions[i]);
            }
            var board = new String[dimension[0]];

            for (var i = 0; i < dimension[0]; i++)
            {
                board[i] = Console.ReadLine();
            }
            var artificialIntelligenceWorker = new ArtificialIntelligenceWorker();

            Console.WriteLine(artificialIntelligenceWorker.NextMegaMaidMove(position[0], position[1], dimension[0], dimension[1], board));
        }
Esempio n. 2
0
        static void RunBotClean()
        {
            var artificialIntelligenceWorker = new ArtificialIntelligenceWorker();
            var temp = Console.ReadLine();

            String[] positions = temp.Split(' ');
            var      position  = new int[2];
            var      board     = new String[5];

            for (var i = 0; i < 5; i++)
            {
                board[i] = Console.ReadLine();
            }
            for (var i = 0; i < 2; i++)
            {
                position[i] = Convert.ToInt32(positions[i]);
            }
            Console.WriteLine(artificialIntelligenceWorker.NextCleanBotMove(position[0], position[1], board));
        }
Esempio n. 3
0
        static void RunBotSavesPrincess()
        {
            int fieldSize;

            fieldSize = int.Parse(Console.ReadLine());

            var grid = new String[fieldSize];

            for (var i = 0; i < fieldSize; i++)
            {
                grid[i] = Console.ReadLine();
            }
            var           artificialIntelligenceWorker = new ArtificialIntelligenceWorker();
            List <string> result = artificialIntelligenceWorker.CalculatePathToPrincess(grid);

            foreach (var direction in result)
            {
                Console.WriteLine(direction);
            }
        }
Esempio n. 4
0
        static void RunBotSavesPrincess2()
        {
            var artificialIntelligenceWorker = new ArtificialIntelligenceWorker();

            var gridSize = int.Parse(Console.ReadLine());

            var position = Console.ReadLine();

            String[] positions       = position.Split(' ');
            var      numberPositions = new int[2];

            numberPositions[0] = Convert.ToInt32(positions[0]);
            numberPositions[1] = Convert.ToInt32(positions[1]);
            var grid = new String[gridSize];

            for (var i = 0; i < gridSize; i++)
            {
                grid[i] = Console.ReadLine();
            }

            Console.WriteLine(artificialIntelligenceWorker.NextMove(gridSize, numberPositions[0], numberPositions[1], grid));
        }