コード例 #1
0
        public RouletteRound CreateNewRound(long tableId)
        {
            var round = new RouletteRound()
            {
                RoundId = ++RoundId
            };

            Console.WriteLine($"Current Round Id{round.RoundId}");
            return(round);
        }
コード例 #2
0
        private void SaveRoundResult(RouletteRound currentRound)
        {
            //await Task.Run(() =>
            //{
            //    _roundRepo.SaveRoundResults(currentRound.RoundResult);
            //});

            _roundRepo.SaveRoundResults(currentRound.RoundResult);
            Console.WriteLine("Creating new round");

            //this doesnt work
        }
コード例 #3
0
 public bool ValidateBet(BetRequestModel betModel, RouletteRound currentRound)
 {
     return(betModel.TotalBetAmount > 0 && !betModel.Bets.Any(x => x.BetAmount < 0) &&
            currentRound.State == RoundState.None);
 }