using System.Collections.Generic; using System.Linq; public class ParticipantActivity { private Dictionary> mCardsUsedThisRound = new Dictionary>(); public ParticipantActivity() { } public void NotifyParticipantUsedCard(BattleParticipant participant, BaseCard card) { if (mCardsUsedThisRound.ContainsKey(participant)) { mCardsUsedThisRound[participant].Add(card); } else { mCardsUsedThisRound[participant] = new List() {card}; } } public int GetNonEmotionCardsUsedThisRound(BattleParticipant participant) { if (mCardsUsedThisRound.ContainsKey(participant)) { return mCardsUsedThisRound[participant].Count(card => card.Type != CardType.Emotion); } else { return 0; } } public void NextRound() { mCardsUsedThisRound.Clear(); } }