public MainViewModel(IGameUpdater updater) { this.updater = updater; this.updater.StatusChanged += Updater_StatusChanged; this.updater.UpdateCompleted += Updater_UpdateCompleted; this.updater.Start(); }
/// <summary> /// Initializes a instance of the SimpleGameEngine class /// </summary> public SimpleGameEngine( IGameRepository gameRepo, IGameUpdater gameUpdater) { this.thisLock = new Object(); this.gameRepository = gameRepo; this.gameUpdater = gameUpdater; }
public GameManager(Board.IBoard board, GameSettings gameSettings, IGameUpdater gameUpdater, List <Lobby.LobbyPlayer> lobbyPlayers) { _lobbyPlayers = lobbyPlayers; Board = board; GameSettings = gameSettings; GameUpdater = gameUpdater; GameState = GameState.Lobby; }
public GameController( IGameRepository repository, INameGenerator nameGenerator, IGameBoardGenerator gameBoardGenerator, IRandomAccessor randomAccessor, IGameUpdater gameUpdater) { _repository = repository ?? throw new ArgumentNullException(nameof(repository)); _nameGenerator = nameGenerator ?? throw new ArgumentNullException(nameof(nameGenerator)); _gameBoardGenerator = gameBoardGenerator ?? throw new ArgumentNullException(nameof(gameBoardGenerator)); _randomAccessor = randomAccessor ?? throw new ArgumentNullException(nameof(randomAccessor)); _gameUpdater = gameUpdater ?? throw new ArgumentNullException(nameof(gameUpdater)); }
public void SetGameManager(GameManager gameManager) { _gameManager = gameManager; _gameUpdater = gameManager.GameUpdater; }