Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ezraroi committed Sep 20, 2024
1 parent f873d37 commit f4818d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Mundialito/Controllers/StatsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ private PerGameModel getResultProbability(float games, float users, List<Bet> be

private PerGameModel getNumOfBingo(float games, float users, List<Bet> bets, MundialitoUser user, MundialitoUser loggedUser, MundialitoUser leader, IEnumerable<MundialitoUser> 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,
Expand Down

0 comments on commit f4818d2

Please sign in to comment.