Implement OilOfSharpness

This commit is contained in:
henriquenakashima 2020-10-09 01:43:37 -04:00
parent 2190070fee
commit 31cb8fe4c0
45 changed files with 604 additions and 21 deletions

View file

@ -0,0 +1,30 @@
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();
}
}