Example #1
0
 public ActionResult SaveScores(ScoreBoard scoreBoard)
 {
     for (int i = 0; i < ScoreBoard.Instance.Teams.Count; i++)
       {
     ScoreBoard.Instance.Teams[i].Score = scoreBoard.Teams[i].Score;
       }
       return new EmptyResult();
 }
Example #2
0
 static ScoreBoard()
 {
     Instance = new ScoreBoard { Teams = new List<TeamScore>() };
       for (int i = 0; i < 4; i++)
       {
     Instance.Teams.Add(new TeamScore { Id = i, Name = string.Format("Team {0}", i + 1), Score = 0 });
       }
 }