Exemplo n.º 1
0
		/// <summary>
		/// Creates a world. 
		/// </summary>
		/// <param name="configuration">Contains the cometition/level name and the settings</param>
		/// <param name="controllerFactory">Is used to create controllers, i.e. entities that control the robots</param>
		/// <param name="state">The initial state of the world</param>
		/// <returns></returns>
		public IWorld CreateWorld(Configuration configuration, ControllerFactory controllerFactory, IWorldState state)
		{
			var competitions = GetCompetitions(configuration.LoadingData);
			var world = competitions.Logic.CreateWorld();
			world.Initialize(competitions, configuration, controllerFactory, state);
			world.Exit += ()=>
				controllerFactory.Exit();
			return world;
		}
Exemplo n.º 2
0
        /// <summary>
        /// Creates a world.
        /// </summary>
        /// <param name="configuration">Contains the cometition/level name and the settings</param>
        /// <param name="controllerFactory">Is used to create controllers, i.e. entities that control the robots</param>
        /// <param name="state">The initial state of the world</param>
        /// <returns></returns>
        public IWorld CreateWorld(Infrastructure.GameSettings configuration, ControllerFactory controllerFactory, WorldState state)
        {
            var competitions = GetCompetitions(configuration.LoadingData);
            var world        = competitions.Logic.CreateWorld();

            world.Initialize(competitions, configuration, controllerFactory, state);
            world.Exit += () =>
                          controllerFactory.Exit();
            return(world);
        }