示例#1
0
        public IChallenge InitializeChallenge(ChallengeConfiguration configuration)
        {
            IChallenge challenge = ChallengeFactory.CreateChallenge(configuration.ChallengeGuid);

            if (challenge != null)
            {
                List <IRobot> robots = RobotFactory.CreateRobots(configuration.Robots);
                challenge.Initialize(robots, configuration.ChallengeMatDetails, configuration.IsSinglePlayer);
            }

            return(challenge);
        }
示例#2
0
        private void ChallengeIsInitialized()
        {
            _challenge = new SquareCardMatChallenge();
            List <IRobot> robots = new List <IRobot>()
            {
                new Robot("TestRobot", new Guid("{44684A66-7BF3-4F6B-969D-BC0F40CAEC10}"))
            };

            SquareMatConfiguration squareMat = new SquareMatConfiguration();

            squareMat.Width = 5;
            _challenge.Initialize(robots, JsonConvert.SerializeObject(squareMat));
        }