Ejemplo n.º 1
0
        public IEnumerable <RDeepBet> GoForBet(RDeepPlayer player, List <RDeepPosition> LastNumbers)
        {
            if (player.coins.Count < 1)
            {
                throw new Exception("Running out of coins!");
            }

            List <RDeepBet> result = new List <RDeepBet>();

            RDeepPosition maxProbableNumber = RDeepPosition.Six;
            float         maxProbability    = maxProbableNumber.defaultProbability;

            if (probabilities.Count < 1)
            {
                UpdateProbabilities(LastNumbers);
            }

            foreach (RDeepPosition number in wheelNumbers)
            {
                if (maxProbability < probabilities[number])
                {
                    maxProbability    = probabilities[number];
                    maxProbableNumber = number;
                }
            }

            List <Coin> betCoins = new List <Coin>();

            int randomTotalCoins;

            if (player.coins.Count(coin => coin.isOnBet == false && coin.Value <= 25) < 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 <= 25).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.GetRDeepBetPositionByPositionIDs(new int[] { maxProbableNumber.ID }),
                           betCoins));

            return(result);
        }
Ejemplo n.º 2
0
        public IEnumerable <RDeepBet> GoForBet(RDeepPlayer player, List <RDeepPosition> LastNumbers)
        {
            List <RDeepBet> result = new List <RDeepBet>();

            int randomWheelNumber = 7;

            randomWheelNumber = Generic.GetRandomNumber(0, 38);

            if (player.coins.Count(coin => coin.isOnBet == false && coin.Value <= 25) < 1)
            {
                throw new Exception("Running out of coins!");
            }

            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 <= 25).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.GetRDeepBetPositionByPositionIDs(new int[] { randomWheelNumber }),
                           betCoins));

            return(result);
        }