예제 #1
0
        private StartRoundResponseViewModel GetStartRoundResponse(List <GamePlayer> players)
        {
            GamePlayer human = players.Where(m => m.Player.Type == (int)PlayerType.Human).First();

            bool canTakeCard = true;

            if (human.RoundScore >= CardValueHelper.BlackJackScore)
            {
                canTakeCard = false;
            }

            bool blackJackChoice = false;

            if (human.BetPayCoefficient == BetValueHelper.WinCoefficient)
            {
                blackJackChoice = true;
            }

            StartRoundResponseViewModel startRoundResponseViewModel =
                CustomMapper.GetStartRoundResponseViewModel(players, human.GameId, canTakeCard, blackJackChoice);

            return(startRoundResponseViewModel);
        }