コード例 #1
0
ファイル: GameService.cs プロジェクト: PavelShcherbakov/BJ
 private BotsPoints SetBotsPointsAsync(BotsPoints botsPoints, RankType rank)
 {
     botsPoints.Points += (int)rank;
     botsPoints.CardsInHand++;
     return(botsPoints);
 }
コード例 #2
0
ファイル: GameService.cs プロジェクト: PavelShcherbakov/BJ
        private (BotsStep botsStep, BotsPoints botsPoints) BotGetCard(List <Card> cards, BotsPoints botsPoints, int stepNumder, int numCard)
        {
            var card = cards.ElementAt(numCard);

            var botsStep = new BotsStep()
            {
                GameId     = botsPoints.GameId,
                BotId      = botsPoints.BotId,
                StepNumder = stepNumder,
                Rank       = card.Rank,
                Suit       = card.Suit,
            };

            botsPoints = SetBotsPointsAsync(botsPoints, card.Rank);
            return(botsStep, botsPoints);
        }