Пример #1
0
 public LoadGameMessageHandler(IGameRetrieverService gameStore, IGameProcessor gameProcessor, ITextParsing textParsing, IGameSaveService gameSaveService)
 {
     _gameStore       = gameStore;
     _gameProcessor   = gameProcessor;
     _textParsing     = textParsing;
     _gameSaveService = gameSaveService;
 }
Пример #2
0
 /// <summary>
 /// Creates a new <see cref="GameSyncManager{T}"/> to handle a given <typeparamref name="T"/> game state.
 /// </summary>
 /// <param name="gameState">The initial game state of the game, from which all turns will be played.</param>
 /// <param name="saveService">The <see cref="IGameSaveService{T}"/> which will be used to create save copies of the <typeparamref name="T"/> game state.</param>
 public GameSyncManager(T gameState, IGameSaveService <T> saveService)
 {
     GameState        = gameState;
     SaveService      = saveService;
     InitialGameState = SaveService.Copy(GameState);
     ActionsList      = new List <IGameAction <T> >();
     NewActionsList   = new List <IGameAction <T> >();
 }
Пример #3
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 SaveGameMessageHandler(IGameSaveService gameSaveService)
 {
     _gameSaveService = gameSaveService;
 }