public void CalculateAccuracies(DeserializeMatch lobbyData)
        {
            //About.Players = About.PlayerTracker.ToList();

            //double[,] Accuracies = new double[About.PlayerTracker.Count, lobbyData.games.Count()]; // (Player | Score/Mapnumber)
            for (int Mapnumber = 0; Mapnumber < lobbyData.games.Count(); Mapnumber++)
            {
                List <KeyValuePair <string, double> > accs     = new List <KeyValuePair <string, double> >();
                List <KeyValuePair <string, double> > teamAccs = new List <KeyValuePair <string, double> >();

                /* Inaccuray points work like follows:
                 * misscount * 3
                 * 50 count * 2
                 * 100 count *1
                 * sum of those is inaccuracy points. Done to make the acc value absolute and not exponential (diff from 95 to 100 bigger than 70 to 75), makes relativ points calculation easier
                 */
                List <KeyValuePair <string, double> > InaccuracyPointsBlue = new List <KeyValuePair <string, double> >();
                List <KeyValuePair <string, double> > InaccuracyPointsRed  = new List <KeyValuePair <string, double> >();
                //calculate players
                for (int Player = 0; Player < About.PlayerTracker.Count; Player++)
                {
                    try
                    {
                        var countmiss = Convert.ToDouble(lobbyData.games[Mapnumber].scores[Player].countmiss);
                        var count50   = Convert.ToDouble(lobbyData.games[Mapnumber].scores[Player].count50);
                        var count100  = Convert.ToDouble(lobbyData.games[Mapnumber].scores[Player].count100);
                        var count300  = Convert.ToDouble(lobbyData.games[Mapnumber].scores[Player].count300);

                        var objectsCount = countmiss + count50 + count100 + count300;
                        var acc          = ((count300 * 3) + count100 + (count50 * 0.5)) / (objectsCount * 3); //calculates acc as percentage

                        //Accuracies[Player, Mapnumber] = acc;
                        string userID = lobbyData.games[Mapnumber].scores[Player].user_id;

                        if (Tournament.CustomTeams)
                        {
                            for (int i = 0; i < teamList.Teams.Length; i++)
                            {
                                if (teamList.Teams[i].Player1 == userID || teamList.Teams[i].Player2 == userID)
                                {
                                    teamList.Teams[i].TeamScore += acc;
                                }
                            }
                        }
                        else
                        {
                            accs.Add(new KeyValuePair <string, double>(userID, acc));
                        }
                        //for relative scoring shenanigens
                        //if (About.teamVS)
                        //{
                        //    var inaccuracyPoints = (countmiss * 3) + (count50 * 2) + count100;
                        //    if(lobbyData.games[Mapnumber].scores[Player].team == "1")
                        //    {
                        //        InaccuracyPointsBlue.Add(new KeyValuePair<string, double>(userID, inaccuracyPoints));
                        //    }
                        //    else
                        //    {
                        //        InaccuracyPointsRed.Add(new KeyValuePair<string, double>(userID, inaccuracyPoints));
                        //    }
                        //}
                        //else
                        //{
                        //    accs.Add(new KeyValuePair<string, double>(userID, acc));
                        //}
                    }
                    catch (Exception)
                    {
                        //Accuracies[Player, Mapnumber] = 0; //accuracies may not be needed, calculation still needs to get done in other categories.
                    }
                }
                //here the scoring type gets determined, needs to still be implemented in scores/maxcombo/misscount
                foreach (var team in teamList.Teams)
                {
                    teamAccs.Add(new KeyValuePair <string, double>(team.Teamname, team.TeamScore));
                }
                List <KeyValuePair <string, double> > points;
                if (Tournament.CustomTeams)
                {
                    points = PointCalculation.CalculatePointsAbsolute(teamAccs, true, (int)Category.Score).ToList(); //gets the points of each player for that specific map and puts that in the pointHistory object
                }
                else
                {
                    points = PointCalculation.CalculatePointsAbsolute(accs, true, (int)Category.Score).ToList(); //gets the points of each player for that specific map and puts that in the pointHistory object
                }

                if (Tournament.CustomTeams)
                {
                    for (int i = 0; i < points.Count; i++)
                    {
                        pointHistory.map[Mapnumber].users[i].accPoints = points[i].Value.ToString();
                    }
                }
                else
                {
                    if (About.teamVS)
                    {
                        double blue = 0;
                        double red  = 0;
                        foreach (var score in InaccuracyPointsBlue)
                        {
                            blue += score.Value;
                        }
                        foreach (var score in InaccuracyPointsRed)
                        {
                            red += score.Value;
                        }
                        if (blue > red) //this is to make sure that the first value is always the bigger one (in case of misscount and acc its the smaller one)
                        {
                            PointCalculation.CalculatePointsRelative(red, blue);
                        }
                        else
                        {
                            PointCalculation.CalculatePointsRelative(blue, red);
                        }
                    }
                    else
                    {
                        for (int i = 0; i < points.Count; i++)
                        {
                            pointHistory.map[Mapnumber].users[i].accPoints = points[i].Value.ToString();
                        }
                    }
                }
            }
        }
        public void CalculateMisscount(DeserializeMatch lobbyData)
        {
            //double[,] Misscounts = new double[About.PlayerTracker.Count, lobbyData.games.Count()]; // (Player | Score/Mapnumber)
            for (int Mapnumber = 0; Mapnumber < lobbyData.games.Count(); Mapnumber++)
            {
                List <KeyValuePair <string, double> > misses     = new List <KeyValuePair <string, double> >();
                List <KeyValuePair <string, double> > teamMisses = new List <KeyValuePair <string, double> >();
                //calculate players
                for (int Player = 0; Player < About.PlayerTracker.Count; Player++)
                {
                    try
                    {
                        //Scores[Player, Mapnumber] = Convert.ToDouble(lobbyData.games[Mapnumber].scores[Player].score);
                        var misscount = Convert.ToDouble(lobbyData.games[Mapnumber].scores[Player].score);

                        string userID = lobbyData.games[Mapnumber].scores[Player].user_id;



                        if (Tournament.CustomTeams)
                        {
                            for (int i = 0; i < teamList.Teams.Length; i++)
                            {
                                if (teamList.Teams[i].Player1 == userID || teamList.Teams[i].Player2 == userID)
                                {
                                    teamList.Teams[i].TeamScore += misscount;
                                }
                            }
                        }
                        else
                        {
                            misses.Add(new KeyValuePair <string, double>(userID, misscount));
                        }
                    }
                    catch (Exception)
                    {
                        //Scores[Player, Mapnumber] = 0;
                    }
                }

                foreach (var team in teamList.Teams)
                {
                    teamMisses.Add(new KeyValuePair <string, double>(team.Teamname, team.TeamScore));
                }

                List <KeyValuePair <string, double> > points;
                if (Tournament.CustomTeams)
                {
                    points = PointCalculation.CalculatePointsAbsolute(teamMisses, false, (int)Category.Score).ToList(); //gets the points of each player for that specific map and puts that in the pointHistory object
                }
                else
                {
                    points = PointCalculation.CalculatePointsAbsolute(misses, false, (int)Category.Score).ToList(); //gets the points of each player for that specific map and puts that in the pointHistory object
                }

                if (Tournament.CustomTeams)
                {
                    for (int i = 0; i < points.Count; i++)
                    {
                        pointHistory.map[Mapnumber].users[i].countmissPoints = points[i].Value.ToString();
                    }
                }
                else
                {
                    if (About.teamVS)
                    {
                        double blue = 0;
                        double red  = 0;
                        foreach (var score in misses)
                        {
                            blue += score.Value;
                        }
                        foreach (var score in misses)
                        {
                            red += score.Value;
                        }
                        if (blue > red) //this is to make sure that the first value is always the bigger one (in case of misscount and acc its the smaller one)
                        {
                            PointCalculation.CalculatePointsRelative(red, blue);
                        }
                        else
                        {
                            PointCalculation.CalculatePointsRelative(blue, red);
                        }
                    }
                    else
                    {
                        for (int i = 0; i < points.Count; i++)
                        {
                            pointHistory.map[Mapnumber].users[i].countmissPoints = points[i].Value.ToString();
                        }
                    }
                }
            }
        }