From f4818d24e1b177bb9c02b0481753524b1a54a9bc Mon Sep 17 00:00:00 2001 From: "roi.ezra" Date: Fri, 20 Sep 2024 14:59:37 +0300 Subject: [PATCH] fixed --- Mundialito/Controllers/StatsController.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Mundialito/Controllers/StatsController.cs b/Mundialito/Controllers/StatsController.cs index 6c1d6b4..1d3de72 100644 --- a/Mundialito/Controllers/StatsController.cs +++ b/Mundialito/Controllers/StatsController.cs @@ -198,12 +198,12 @@ private PerGameModel getResultProbability(float games, float users, List be private PerGameModel getNumOfBingo(float games, float users, List bets, MundialitoUser user, MundialitoUser loggedUser, MundialitoUser leader, IEnumerable followees) { - var best = bets.GroupBy((bet) => bet.User.FirstName + " " + bet.User.LastName).ToDictionary(g => g.Key, g => g.Where((bet) => bet.Points == 7).Count()).OrderByDescending(x => x.Value).FirstOrDefault(); - var requested = bets.Where((bet) => bet.User.UserName == user.UserName).Where((bet) => bet.Points == 7).Count(); - var followeesRes = bets.Where((bet) => followees.Where((fol) => fol.UserName == bet.User.UserName).Any()).Where((bet) => bet.Points == 7).Count(); - var logged = bets.Where((bet) => bet.User.UserName == loggedUser.UserName).Where((bet) => bet.Points == 7).Count(); - var leaderBingo = bets.Where((bet) => bet.User.UserName == leader.UserName).Where((bet) => bet.Points == 7).Count(); - var all = bets.Where((bet) => bet.Points == 7).Count(); + var best = bets.GroupBy((bet) => bet.User.FirstName + " " + bet.User.LastName).ToDictionary(g => g.Key, g => g.Where((bet) => bet.MaxPoints).Count()).OrderByDescending(x => x.Value).FirstOrDefault(); + var requested = bets.Where((bet) => bet.User.UserName == user.UserName).Where((bet) => bet.MaxPoints).Count(); + var followeesRes = bets.Where((bet) => followees.Where((fol) => fol.UserName == bet.User.UserName).Any()).Where((bet) => bet.MaxPoints).Count(); + var logged = bets.Where((bet) => bet.User.UserName == loggedUser.UserName).Where((bet) => bet.MaxPoints).Count(); + var leaderBingo = bets.Where((bet) => bet.User.UserName == leader.UserName).Where((bet) => bet.MaxPoints).Count(); + var all = bets.Where((bet) => bet.MaxPoints).Count(); return new PerGameModel { You = logged,