Ejemplo n.º 1
0
        public TwitchHearthstone(TwitchChatRoom room) : base(room, typeof(HSStateOff))
        {
            HearthstoneEventObserver hearthObserver = new HearthstoneEventObserver(room.factory.CreateHearthstoneFactory());

            hearthObserver.RegisterObserver(HearthEvent);
        }
 public HearthInternalState(HearthstoneEventObserver eventObserver)
 {
     this.eventObserver = eventObserver;
 }
 public HearthInternalStateGameInProgress(HearthstoneEventObserver eventObserver) : base(eventObserver)
 {
     this.factory = eventObserver.factory;
     eventObserver.Observe(new NewGame(eventObserver.currentGame));
 }
 public HearthInternalState(HearthstoneEventObserver eventObserver)
 {
     this.eventObserver = eventObserver;
 }
 public HearthInternalStateGameInProgress(HearthstoneEventObserver eventObserver)
     : base(eventObserver)
 {
     this.factory = eventObserver.factory;
     eventObserver.Observe(new NewGame(eventObserver.currentGame));
 }
 public HearthInternalStateOff(HearthstoneEventObserver eventObserver, bool? weWon = null)
     : base(eventObserver)
 {
     eventObserver.Observe(new EndOfGame(eventObserver.currentGame, weWon));
 }
 public HearthInternalStateOff(HearthstoneEventObserver eventObserver, bool?weWon = null) : base(eventObserver)
 {
     eventObserver.Observe(new EndOfGame(eventObserver.currentGame, weWon));
 }