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); }
public async Task <bool> SetInsure([FromBody] SetPlayerInsureGameView setPlayerInsureGameView) { bool response = await _gameLogicService.SetInsure(setPlayerInsureGameView); return(response); }