Exemple #1
0
        /// <summary>
        /// Configures the game using the provided game configuration.
        /// </summary>
        /// <param name="configuration">The configuration the game should use.</param>
        /// <returns>Returns an awaitable Task</returns>
        public Task Configure(IGameConfiguration configuration)
        {
            this.Configuration = configuration;
            this.configuredAdapters = configuration.GetAdapters();
            foreach(IAdapter adapter in this.configuredAdapters)
            {
                adapter.Configure();
            }

            return Task.FromResult(0);
        }
        /// <summary>
        /// Configures the game using the provided game configuration.
        /// </summary>
        /// <param name="configuration">The configuration the game should use.</param>
        /// <returns>Returns an awaitable Task</returns>
        public Task Configure(IGameConfiguration configuration)
        {
            this.Configuration      = configuration;
            this.configuredAdapters = configuration.GetAdapters();
            foreach (IAdapter adapter in this.configuredAdapters)
            {
                adapter.Configure();
            }

            return(Task.FromResult(0));
        }