예제 #1
0
        public void Should_deploy_robots()
        {
            var robotsToDeploy = new List <IRobot> {
                new Robot(new Compass())
            };

            battleArena.DeployRobots(robotsToDeploy);

            robotsToDeploy.ForEach(robot => robot.BattleArena.Should().Not.Be.Null());
        }
예제 #2
0
        public void SetUpCompetition(InputCompetitionDataDTO competitionData)
        {
            _robots = _robotMapper.FromListRobotDTOToListRobot(competitionData.RobotsToDeploy);

            _battleArena.SetUpArena(
                _arenaMapper.FromArenaCoordinatesDTOToArenaCoordinates(competitionData.ArenaBottomLeftCoords),
                _arenaMapper.FromArenaCoordinatesDTOToArenaCoordinates(competitionData.ArenaUpperRightCoords)
                );

            _battleArena.DeployRobots(_robots);

            _navigationSystem.ConnectNavigationSystemToBattleArena(_battleArena);

            _competitionIsReady = true;
        }