コード例 #1
0
 public void Add(FfgDie die)
 {
     if (m_Counts.ContainsKey(die))
     {
         ++m_Counts[die];
     }
     else
     {
         m_Counts[die] = 1;
     }
 }
コード例 #2
0
            public void Remove(FfgDie die)
            {
                if (m_Counts.ContainsKey(die))
                {
                    --m_Counts[die];

                    if (m_Counts[die] == 0)
                    {
                        m_Counts.Remove(die);
                    }
                }
            }
コード例 #3
0
            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);
                            }
                        }
                    }
                }
            }
コード例 #4
0
 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 }
         };
     }
 }