Esempio n. 1
0
        public void Handle(IGameMessage message, IActionScope turnScope)
        {
            if (message is IPlayerScoped && turnScope.Player != this)
            {
                return;
            }

            _controller.HandleGameEvent(message, turnScope).Execute();
            Hand.Handle(message, turnScope);
        }
Esempio n. 2
0
        public void Handle(IGameMessage @event, IReactionScope scope)
        {
            if (@event is DeckDepletedEvent)
            {
                Handle(@event as DeckDepletedEvent);
                return;
            }

            if (@event is IAttackEffect)
            {
                HandleAttack(@event as IAttackEffect, scope);
            }

            Hand.Handle(@event, scope);

            if (@event.GetAvailableResponses().Count() == 1)
            {
                @event.GetDefaultResponse().Execute();
            }
            else
            {
                _controller.HandleGameEvent(@event, scope).Execute();
            }
        }