public IEnumerable <RDeepBet> GoForBetRandomBetTypes(RDeepPlayer player, List <RDeepPosition> LastNumbers) { List <RDeepBet> result = new List <RDeepBet>(); if (player.coins.Count < 1) { throw new Exception("Running out of coins!"); } int randomNoOfBets = Generic.GetRandomNumber(1, 4); for (int b = 0; b < randomNoOfBets; b++) { int BetPosition = Generic.GetRandomNumber(1, RDeepBetPositions.Total + 1); List <Coin> betCoins = new List <Coin>(); int randomTotalCoins; if (player.coins.Count < 4) { randomTotalCoins = 1; } else { randomTotalCoins = Generic.GetRandomNumber(1, 2); } for (int i = 0; i < randomTotalCoins; i++) { List <Coin> activeCoins = player.coins.Where(coin => coin.isOnBet == false && coin.Value <= 5).ToList(); int randomCoin = Generic.GetRandomNumber(0, activeCoins.Count); activeCoins[randomCoin].isOnBet = true; betCoins.Add(activeCoins[randomCoin]); System.Threading.Thread.Sleep(100); } result.Add(new RDeepBet( player, RDeepBetPositions.GetRDeepBetPositionByID(BetPosition), betCoins)); if (player.coins.Count == 0) { break; } System.Threading.Thread.Sleep(150); } return(result); }
public static bool ValidateBet(int BetPositionID, int CurrentNumber) { RDeepBetPosition RDeepBetPosition = RDeepBetPositions.GetRDeepBetPositionByID(BetPositionID); return(ValidateBet(RDeepBetPosition, CurrentNumber)); }