Пример #1
0
 public LoadGameMessageHandler(IGameRetrieverService gameStore, IGameProcessor gameProcessor, ITextParsing textParsing, IGameSaveService gameSaveService)
 {
     _gameStore       = gameStore;
     _gameProcessor   = gameProcessor;
     _textParsing     = textParsing;
     _gameSaveService = gameSaveService;
 }
Пример #2
0
 public CustomGameTestTask(IGameTestExecutor gameTestExecutor, IGameTestDataProvider dataProvider,
                           IGameRetrieverService gameRetriever)
 {
     _testExecutor  = gameTestExecutor;
     _dataProvider  = dataProvider;
     _gameRetriever = gameRetriever;
 }
Пример #3
0
 public GameController(GameTestingReportCompiler testReportCompiler, IConfigurationService configService, IGoogleDriveService driveService, IGameRetrieverService drawStore, IPlayerDatabaseController playerController, IStatisticsService statisticsService)
 {
     _configService          = configService;
     _driveService           = driveService;
     _gameStore              = drawStore;
     _playerController       = playerController;
     _statisticsService      = statisticsService;
     _gameTestReportCompiler = testReportCompiler;
 }
Пример #4
0
 public MenuMessageHandler(IGameRetrieverService gameStore, IGameProcessor gameProcessor, ITextParsing textParsing, IGameSaveService gameSaveService,
                           IConfigurationService configService, IReporter reporter)
 {
     _mainMenuMessageHandler = new MainMenuMessageHandler(gameStore, gameProcessor, textParsing);
     _gameStore       = gameStore;
     _textParsing     = textParsing;
     _gameProcessor   = gameProcessor;
     _gameSaveService = gameSaveService;
     _configService   = configService;
     _reporter        = reporter;
 }
        public static ExecutionResult ReturnToGame(Player player, IGameRetrieverService _gameStoreService, ITextParsing textParsing, IGameProcessor gameProcessor)
        {
            player.PlayerFlag = PlayerFlag.IN_GAME.ToString();
            var games       = _gameStoreService.ListGames();
            var playerState = player.ActiveGameSave;
            var gameFound   = games.Where(a => a.GameName == playerState.GameName).FirstOrDefault();
            var state       = gameFound.FindStateById(playerState.StateId);
            var execResult  = new ExecutionResult
            {
                MessagesToShow = new List <MessageResult> {
                    new MessageResult {
                        Message = textParsing.ParseText(playerState, state.StateText)
                    }
                },
                OptionsToShow = gameProcessor.GetCurrentOptions(playerState, gameFound, state)
            };

            execResult.OptionsToShow.Add("-Menu-");
            return(execResult);
        }
Пример #6
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IGameRetrieverService gameStore, IConfigurationService configService)
        {
            //app.UseResponseCompression();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseWebAssemblyDebugging();
                Log.LogMessage("Starting up WebServer as Development");
            }
            else
            {
                app.UseHsts();
                app.UseHttpsRedirection();
                app.UseExceptionHandler("/error");
                Log.LogMessage("Starting up WebServer as Production");
            }

            app.UseBlazorFrameworkFiles();
            app.UseStaticFiles();
            app.UseRouting();
            app.UseCookiePolicy();
            app.UseAuthentication();
            app.UseEndpoints(endpoints =>
            {
                endpoints.MapRazorPages();
                endpoints.MapControllers();
                endpoints.MapFallbackToFile("index.html");
            });
            Log.LogMessage("Finished configuration");

            configService.SetConfig("TypeName", ConfigSetting.DynamicApplicationName);

            Log.LogMessage("Retrieving games");

            gameStore.ListGames();
        }
 public GameMessageHandler(IGameRetrieverService gameStore, IGameProcessor gameProcessor)
 {
     _gameStore     = gameStore;
     _gameProcessor = gameProcessor;
 }
Пример #8
0
 public GameTester(IGameTestExecutor testExecutor, IGameTestDataProvider dataProvider, IGameRetrieverService drawStore)
 {
     _testExecutor = testExecutor;
     _dataProvider = dataProvider;
     _drawStore    = drawStore;
 }
 public AchievementStatisticsBuilder(IStatisticsService statisticsService, IDatabaseContextProvider dbContext, IGameRetrieverService gameRetrieverService)
 {
     _statisticsService    = statisticsService;
     _gameRetrieverService = gameRetrieverService;
     _dbContext            = dbContext;
 }
Пример #10
0
 public GameTestingReportCompiler(IGameTestDataProvider dataProvider, IGameRetrieverService gameRetriever)
 {
     _dataProvider  = dataProvider;
     _gameRetriever = gameRetriever;
 }
 public MainMenuMessageHandler(IGameRetrieverService gameStore, IGameProcessor gameProcessor, ITextParsing textParsing)
 {
     _gameStore     = gameStore;
     _gameProcessor = gameProcessor;
     _textParsing   = textParsing;
 }
Пример #12
0
 public ActionResolver(IGameRetrieverService gameStore)
 {
     _gameStore = gameStore;
 }
Пример #13
0
 public GameController(ILogger <GameController> logger, IGameRetrieverService retrieverService)
 {
     _logger           = logger;
     _retrieverService = retrieverService;
 }