Ejemplo n.º 1
0
        /// <summary>
        /// Bet in the roulette
        /// </summary>
        /// <param name="betRoulette">Bet</param>
        /// <returns></returns>
        public async Task <ResultBet> BetInRoulette(BetRoulette betRoulette)
        {
            if (ValidateNumber(betRoulette) ||
                ValidateColor(betRoulette) &&
                ValidateDollars(betRoulette))
            {
                var resultBetBd = await _rouletteService.BetRoulette(betRoulette);

                if (resultBetBd)
                {
                    return(new ResultBet {
                        Succesfull = true, Message = MessageResource.OkBet
                    });
                }
            }

            return(new ResultBet {
                Succesfull = false, Message = MessageResource.ErrorDataBet
            });
        }