コード例 #1
0
 public MainViewModel(IGameUpdater updater)
 {
     this.updater = updater;
     this.updater.StatusChanged   += Updater_StatusChanged;
     this.updater.UpdateCompleted += Updater_UpdateCompleted;
     this.updater.Start();
 }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
ファイル: GameManager.cs プロジェクト: TomCrow/VsadilNestihl
        public GameManager(Board.IBoard board, GameSettings gameSettings, IGameUpdater gameUpdater, List <Lobby.LobbyPlayer> lobbyPlayers)
        {
            _lobbyPlayers = lobbyPlayers;

            Board        = board;
            GameSettings = gameSettings;
            GameUpdater  = gameUpdater;
            GameState    = GameState.Lobby;
        }
コード例 #4
0
 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));
 }
コード例 #5
0
ファイル: Player.cs プロジェクト: TomCrow/VsadilNestihl
 public void SetGameManager(GameManager gameManager)
 {
     _gameManager = gameManager;
     _gameUpdater = gameManager.GameUpdater;
 }