public void Add(FfgDie die) { if (m_Counts.ContainsKey(die)) { ++m_Counts[die]; } else { m_Counts[die] = 1; } }
public void Remove(FfgDie die) { if (m_Counts.ContainsKey(die)) { --m_Counts[die]; if (m_Counts[die] == 0) { m_Counts.Remove(die); } } }
public void RemoveSecret(DiscordMember member, FfgDie die) { if (m_Secrets.ContainsKey(member)) { if (m_Secrets[member].ContainsKey(die)) { --m_Secrets[member][die]; if (m_Secrets[member][die] == 0) { m_Secrets[member].Remove(die); if (m_Secrets[member].Count == 0) { m_Secrets.Remove(member); } } } } }
public void AddSecret(DiscordMember member, FfgDie die) { if (m_Secrets.ContainsKey(member)) { if (m_Secrets[member].ContainsKey(die)) { ++m_Secrets[member][die]; } else { m_Secrets[member][die] = 1; } } else { m_Secrets[member] = new Dictionary <FfgDie, uint>() { { die, 1 } }; } }