Exemple #1
0
 internal static void UpdateMatchStats(TempAccumulator accum, MatchGroup match, int playersAdded, int currentMatchNumber)
 {
     match.MinSkillIndex      = accum.minSkill;
     match.MaxSkillIndex      = accum.maxSkill;
     match.AvgSkillIndex      = accum.accumSkill / playersAdded;
     match.MinRemotenessIndex = accum.minRemoteness;
     match.MaxRemotenessIndex = accum.maxRemoteness;
     match.AvgRemotenessIndex = accum.accumRemoteness / playersAdded;
     match.MinWaitingTime     = accum.minWaitingTime;
     match.MaxWaitingTime     = accum.maxWaitingTime;
     match.AvgWaitingTime     = accum.accumWaitingTime / playersAdded;
     match.MatchNumber        = currentMatchNumber;
     match.NumberOfPlayers    = playersAdded;
 }
Exemple #2
0
        internal static void UpdateMatchCounters(TempAccumulator accum, Player player)
        {
            long playerWaitingTime = (DateTime.Now.Ticks - player.QueueIngressTime) / 10_000; // Ticks to ms

            accum.minSkill    = Min(accum.minSkill, player.Skill);
            accum.maxSkill    = Max(accum.maxSkill, player.Skill);
            accum.accumSkill += player.Skill;

            accum.minRemoteness    = Min(accum.minRemoteness, player.Remoteness);
            accum.maxRemoteness    = Max(accum.maxRemoteness, player.Remoteness);
            accum.accumRemoteness += player.Remoteness;

            accum.minWaitingTime    = Min(accum.minWaitingTime, playerWaitingTime);
            accum.maxWaitingTime    = Max(accum.maxWaitingTime, playerWaitingTime);
            accum.accumWaitingTime += playerWaitingTime;
        }