示例#1
0
        private static GameRoundViewModel GetGameRoundViewModel(Game game, int number)
        {
            var gameRoundViewModel = new GameRoundViewModel()
            {
                Id = game.Id,
                Number = number
            };

            foreach (var scorecard in game.Scorecards)
            {
                var round = scorecard.GetRound(number);
                gameRoundViewModel.AddPlayer(scorecard.GetUserName(), round.Score);
            }
            return gameRoundViewModel;
        }