/// <summary> /// Returns the number of players in a <see cref="MmrSnapshot" /> that fall into the classification /// </summary> public int GetMmrBoundsInClassification(MmrSnapshot snapshot) { int playerCount = 0; int lastMmr = 0; foreach (var point in snapshot.MmrList) { lastMmr = point.Mmr; playerCount += point.NumberOfPlayers; if (playerCount > PlayerCount) { break; } } return(lastMmr); }
/// <summary> /// Returns the number of players in a <see cref="MmrSnapshot" /> that fall into the classification /// </summary> public int GetPlayerCountInClassification(MmrSnapshot snapshot) { var data = snapshot.MmrList; int count = 0; foreach (CompressedMmrData point in data) { if (point.Mmr >= LowerMmrBoundary) { count += point.NumberOfPlayers; } else { break; } } return(count); }