Ejemplo n.º 1
0
        private void OnDelayEnded(Task obj)
        {
            Frozen = false;
            List <Card> openedCards = Cards.FindAll(x => x.Status == CardStatus.OPEN);

            if (openedCards[0].Equals(openedCards[1]))
            {
                openedCards.ForEach(x => x.Status = CardStatus.FOUND);
                ActivePlayer.AddFoundCards(openedCards);
                bool IsGameFinished = GameFinished;
                if (IsGameFinished)
                {
                    Startable = true;
                }
                return;
            }
            openedCards.ForEach(x => x.Status = CardStatus.CLOSED);
            SwapPlayers();
        }