Ejemplo n.º 1
0
        private void PlayCard(IPlayerCard card, List <ICard> targetCards)
        {
            if (!card.CanPlay(this.CurrentChaseState))
            {
                return;
            }

            this.PhaseManager.State = ChasePhase.PlayingAnimation;
            this.CurrentChaseState  = card.Play(this.CurrentChaseState, targetCards, this.UiManager);

            // Check if the player has won or lost as a result of playing this card.
            if (this.CheckForChaseEnd())
            {
                return;
            }

            this.UiManager.OnceAnimationQueueCompletes(() => {
                this.PhaseManager.State = ChasePhase.SelectingCard;
            });
        }