Exemplo n.º 1
0
        public async Task <bool> SetInsure(SetPlayerInsureGameView setPlayerInsureGameView)
        {
            Hand hand = await _handRepository.GetHandByRoundAndPlayerId(setPlayerInsureGameView.RoundId, setPlayerInsureGameView.PlayerId);

            if (hand == null)
            {
                return(false);
            }

            int insuranceCoins = hand.Deal / GameConstants.INSURE_DEVISION;

            hand.InsuranceCoins = insuranceCoins;

            await _handRepository.Update(hand);

            return(true);
        }
Exemplo n.º 2
0
        public async Task <bool> SetInsure([FromBody] SetPlayerInsureGameView setPlayerInsureGameView)
        {
            bool response = await _gameLogicService.SetInsure(setPlayerInsureGameView);

            return(response);
        }