Exemple #1
0
 void RevealTemp(GameCardInZone newCard)
 {
     // IMPROVE if a card is shuffled into library, then drawn and revealed in hand,
     // it will temporarily be counted double in opponent cards seen.
     // When the card is revealed "for real" (played or instanceId coupled to it),
     // the double counting will stop, giving the impression that a seen card got removed.
     // We could probably prevent this temporary ghost card from showing up,
     // but it's a lot of work for something that will rarely happen -> not worth it
     tempRevealed.Add(newCard);
     Log.Debug("added temp card {newCard}", newCard);
 }
Exemple #2
0
        void RevealCard(GameCardInZone newCard)
        {
            if (knownCardsByInstId.ContainsKey(newCard.InstId))
            {
                return;
            }

            TryRemoveFromShuffled(newCard);

            knownCardsByInstId.Add(newCard.InstId, newCard);
            Log.Debug("added revealed card {newCard}", newCard);
        }
Exemple #3
0
        bool TryRemoveFromShuffled(GameCardInZone newCard)
        {
            if (!shuffledKnownCards.TryGetValue(newCard.GrpId, out var shuffled))
            {
                return(false);
            }

            var removed = shuffled.TryRemove(newCard.InstId);

            if (shuffled.Count == 0)
            {
                shuffledKnownCards.Remove(newCard.GrpId);
            }

            return(removed);
        }