Exemple #1
0
 public IndexPageModule(ITournament tournament, ISubmittedBets bets, IResults actual)
 {
     Get["/"] = _ =>
     {
         return(View["frontpage.sshtml", new IndexPageViewModel(tournament, bets, actual)]);
     };
 }
Exemple #2
0
 public IndexPageViewModel(ITournament t, ISubmittedBets sb, IResults actual)
 {
     _tournament = t;
     CreateGroups();
     CreateBetterlist(sb.GetBetters(), sb, actual);
     MarkWinnerIfFinished(actual);
     TimeStamp = actual.GetTimeStamp();
 }
Exemple #3
0
 public IndexPageViewModel(ITournament t, ISubmittedBets sb, IResultCollection rc)
 {
     _tournament = t;
     CreateGroups();
     CreateBetterlist(sb.GetBetters(), sb, rc);
     EvaluateTrends();
     MarkWinnerIfFinished(rc.Current);
     TimeStamp = rc.Current.GetTimeStamp();
 }
 public BetterPageModule(ITournament tournament, ISubmittedBets bets, IResultCollection rc)
 {
     Get["/{better}"] = _ =>
     {
         // disable once ConvertToLambdaExpression
         return(View["betterpage.sshtml", new BetterPageViewModel(tournament,
                                                                  bets.GetSingleBet(_.better),
                                                                  rc.Current)]);
     };
 }
Exemple #5
0
 void CreateBetterlist(List <string> betters, ISubmittedBets sb, IResults actual)
 {
     foreach (var better in betters)
     {
         var score = new ScoringSystem(sb.GetSingleBet(better), actual);
         var bet   = new Better()
         {
             Name = better, Score = score.GetTotal()
         };
         var achievements = new AchievementSystem(sb.GetSingleBet(better), actual);
         bet.Achievements = achievements.Achievements;
         bet.RowClass     = "normal";
         Betters.Add(bet);
     }
 }
Exemple #6
0
 void CreateBetterlist(List <string> betters, ISubmittedBets sb, IResultCollection rc)
 {
     foreach (var better in betters)
     {
         var score    = new ScoringSystem(sb.GetSingleBet(better), rc.Current);
         var oldscore = new ScoringSystem(sb.GetSingleBet(better), rc.Previous);
         var bet      = new Better()
         {
             Name = better, Score = score.GetTotal(), OldScore = oldscore.GetTotal()
         };
         var achievements = new AchievementSystem(sb.GetSingleBet(better), rc.Current);
         bet.Achievements = achievements.Achievements;
         bet.RowClass     = "normal";
         Betters.Add(bet);
     }
 }