Beispiel #1
0
 public PhutballBoardPresenter(PhutballGameState phutballGameState,
                               IEventPublisher eventPublisher,
                               Func <PhutballBoardModel> boardCreator)
 {
     _phutballGameState = phutballGameState;
     _eventPublisher    = eventPublisher;
     _boardCreator      = boardCreator;
 }
 public PhutballBoardPresenter(PhutballGameState phutballGameState, 
     IEventPublisher eventPublisher,
     Func<PhutballBoardModel> boardCreator)
 {
     _phutballGameState = phutballGameState;
     _eventPublisher = eventPublisher;
     _boardCreator = boardCreator;
 }
Beispiel #3
0
 public GameStatePresenter(PhutballGameState gameState,
                           IEventPublisher eventPublisher)
 {
     _gameState      = gameState;
     _eventPublisher = eventPublisher;
     _timer          = new DispatcherTimer()
     {
         Interval  = TimeSpan.FromMilliseconds(200),
         IsEnabled = false
     };
     _timer.Tick += UpdatePlayersTimes;
     _eventPublisher.Subscribe <PlayerWonEvent>(OnCurrentPlayerWon);
 }