30 lines
No EOL
954 B
C#
30 lines
No EOL
954 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
public class ParticipantActivity {
|
|
|
|
private Dictionary<BattleParticipant, List<BaseCard>> mCardsUsedThisRound = new Dictionary<BattleParticipant, List<BaseCard>>();
|
|
|
|
public ParticipantActivity() {
|
|
}
|
|
|
|
public void NotifyParticipantUsedCard(BattleParticipant participant, BaseCard card) {
|
|
if (mCardsUsedThisRound.ContainsKey(participant)) {
|
|
mCardsUsedThisRound[participant].Add(card);
|
|
} else {
|
|
mCardsUsedThisRound[participant] = new List<BaseCard>() {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();
|
|
}
|
|
} |