public void UpdatePacman(int generation) { var oneGenerationPacman = _sqLiteConnection.GetOneGenerationPacmans(generation); foreach (var pacman in oneGenerationPacman) { var pointsArr = IntHelper.GetPointsArr(pacman.PointsString); // pacman.MaxPoints= pointsArr.OrderByDescending(x => x).First(); pacman.PositivePointsCount = pointsArr.Where(x => x > 0).Count(); _sqLiteConnection.UpdatePacmansMaxPoints(pacman); } }