Example #1
0
        private void CreateRobots()
        {
            int nrOfRobots = inputData.NrOfRobots;

            for (int robotIndex = 0; robotIndex < nrOfRobots; robotIndex++)
            {
                string initPosAndOrientString = inputData.GetInitialPositionAndOrientation(robotIndex);
                var    initPosAndOrient       = InputDataTranslator.TranslateInitialPositionAndOrientation(
                    initPosAndOrientString);
                ValidateInitialPositionAndOrientation(initPosAndOrient);

                mineRovers.Robots[robotIndex].SetPosition(initPosAndOrient.X, initPosAndOrient.Y);
                mineRovers.Robots[robotIndex].SetOrientation(initPosAndOrient.Orientation);
            }
        }
Example #2
0
        private void SetSizeOfArena()
        {
            var sizeOfArena = InputDataTranslator.TranslateSizeOfArena(inputData.GetSizeOfArena());

            mineRovers.arena = new Arena(sizeOfArena);
        }