Example #1
0
 public void doTeams(Dictionary<TeamsKey, TeamsValue> teamsDict, TeamsKey tKey, object team, bool guessed)
 {
     TeamsValue tVal = new TeamsValue();
     tKey.Team = team.ToString();
     if (!teamsDict.ContainsKey(tKey))
     {
         tVal.Matches = 1;
         tVal.Guessed = guessed ? 1 : 0;
     }
     else
     {
         tVal.Matches++;
         if (guessed) tVal.Guessed++;
     }
     tVal.GuessedPercent = (int)((double)tVal.Guessed / tVal.Matches * 100);
     teamsDict[tKey] = tVal;
 }
Example #2
0
        public void doTeams(Dictionary <TeamsKey, TeamsValue> teamsDict, TeamsKey tKey, object team, bool guessed)
        {
            TeamsValue tVal = new TeamsValue();

            tKey.Team = team.ToString();
            if (!teamsDict.ContainsKey(tKey))
            {
                tVal.Matches = 1;
                tVal.Guessed = guessed ? 1 : 0;
            }
            else
            {
                tVal.Matches++;
                if (guessed)
                {
                    tVal.Guessed++;
                }
            }
            tVal.GuessedPercent = (int)((double)tVal.Guessed / tVal.Matches * 100);
            teamsDict[tKey]     = tVal;
        }