public RouletteRound CreateNewRound(long tableId) { var round = new RouletteRound() { RoundId = ++RoundId }; Console.WriteLine($"Current Round Id{round.RoundId}"); return(round); }
private void SaveRoundResult(RouletteRound currentRound) { //await Task.Run(() => //{ // _roundRepo.SaveRoundResults(currentRound.RoundResult); //}); _roundRepo.SaveRoundResults(currentRound.RoundResult); Console.WriteLine("Creating new round"); //this doesnt work }
public bool ValidateBet(BetRequestModel betModel, RouletteRound currentRound) { return(betModel.TotalBetAmount > 0 && !betModel.Bets.Any(x => x.BetAmount < 0) && currentRound.State == RoundState.None); }