Exemplo n.º 1
0
    public void SwapCard(Card handCard, Card deckCard)
    {
        var handIndex = HandCards.IndexOf(handCard);

        HandCards.Remove(handCard);
        HandCards.Insert(handIndex, deckCard);

        var deckIndex = DeckCards.IndexOf(deckCard);

        DeckCards.Remove(deckCard);
        DeckCards.Insert(deckIndex, handCard);

        IsSwapped[handIndex] = !IsSwapped[handIndex];

        RefreshCards();
    }