public async Task <bool> CheckDealPlayer(CheckDealPlayerGameView checkDealPlayerGameView) { Player player = await _playerRepository.Get(checkDealPlayerGameView.PlayerId); if (player == null) { var stringBuilder = new StringBuilder(); stringBuilder.AppendLine(string.Format("RoundId: {0}", checkDealPlayerGameView.RoundId)); stringBuilder.AppendLine(string.Format("PlayerId: {0}", checkDealPlayerGameView.PlayerId)); stringBuilder.AppendLine(string.Format("Message: {0}", SolutionConstants.BUSINESS_LOGIC_GET_ITEM_EXCEPTION_MESSAGE)); string message = stringBuilder.ToString(); throw new BusinessLogicGetItemException(message); } bool result = player.Coins >= checkDealPlayerGameView.Coins; return(result); }
public async Task <bool> CheckDealPlayer([FromBody] CheckDealPlayerGameView checkDealPlayerGameView) { bool response = await _gameLogicService.CheckDealPlayer(checkDealPlayerGameView); return(response); }