Exemplo n.º 1
0
        public decimal BetFunction(Random random, decimal money, int one = 0, int two = 0, int three = 0, int four = 0)
        {
            var generate = random.Next(1, 37);

            Console.WriteLine($"Result: {RouletteTable.PrintName(generate)}");
            if (Enumerable.Range(1, 7).Contains(generate) && one == 1 && four == 0)
            {
                return(OnWin(money));
            }
            if (Enumerable.Range(7, 13).Contains(generate) && two == 1 && four == 0)
            {
                return(OnWin(money));
            }
            if (Enumerable.Range(13, 19).Contains(generate) && three == 1)
            {
                return(OnWin(money));
            }
            if (Enumerable.Range(19, 25).Contains(generate) && four == 1 && one == 0 && two == 0)
            {
                return(OnWin(money));
            }
            if (Enumerable.Range(25, 31).Contains(generate) && one == 1 && four == 1)
            {
                return(OnWin(money));
            }
            if (Enumerable.Range(31, 37).Contains(generate) && two == 1 && four == 1)
            {
                return(OnWin(money));
            }
            else
            {
                return(OnLose(money));
            }
        }
Exemplo n.º 2
0
        public decimal BetFunction(Random random, decimal money, int one = 0, int two = 0, int three = 0, int four = 0)
        {
            var generate = random.Next(0, 38);

            Console.WriteLine($"Result: {RouletteTable.PrintName(generate)}");
            if (one == 1)
            {
                if (generate > 0 && generate < 19)
                {
                    return(OnWin(money));
                }
                else
                {
                    return(OnLose(money));
                }
            }
            else if (one == 2)
            {
                if (generate > 18 && generate < 37)
                {
                    return(OnWin(money));
                }
                else
                {
                    return(OnLose(money));
                }
            }
            else
            {
                return(OnLose(money));
            }
        }
Exemplo n.º 3
0
        public decimal BetFunction(Random random, decimal money, int one = 0, int two = 0, int three = 0, int four = 0)
        {
            var number = random.Next(0, 38);

            Menu.ClearCompletely();
            Console.WriteLine($"Result: {RouletteTable.PrintName(number)}");
            if (one == number)
            {
                return(OnWin(money));
            }
            else
            {
                return(OnLose(money));
            }
        }
Exemplo n.º 4
0
        public decimal BetFunction(Random random, decimal money, int one = 0, int two = 0, int three = 0, int four = 0)
        {
            var generate = random.Next(1, 37);

            Console.WriteLine($"Result: {RouletteTable.PrintName(generate)}");
            if (Enumerable.Range(1, 12).Contains(generate) && one == 1)
            {
                return(OnWin(money));
            }
            if (Enumerable.Range(12, 24).Contains(generate) && one == 2)
            {
                return(OnWin(money));
            }
            if (Enumerable.Range(24, 37).Contains(generate) && one == 3)
            {
                return(OnWin(money));
            }
            else
            {
                return(OnLose(money));
            }
        }
Exemplo n.º 5
0
        public decimal BetFunction(Random random, decimal money, int one = 0, int two = 0, int three = 0, int four = 0)
        {
            var generate = random.Next(1, 37);

            Console.WriteLine($"Result: {RouletteTable.PrintName(generate)}");
            int min;
            int max;
            int middle;

            if (one == 1)
            {
                min    = one;
                max    = one + 2;
                middle = one + 1;
            }
            else if (one == 36)
            {
                min    = one - 2;
                max    = one;
                middle = one - 1;
            }
            else
            {
                min    = one - 1;
                max    = one + 1;
                middle = one;
            }

            if (generate == middle || generate == min || generate == max)
            {
                return(OnWin(money));
            }
            else
            {
                return(OnLose(money));
            }
        }
Exemplo n.º 6
0
        public (int, Dictionary <string, int>, Dictionary <string, int>, Dictionary <string, int>, Dictionary <string, int>) HandleTwo(int total, int[] arr1, int[] arr2, int[] arr3, int index1, int index2, int index3, Dictionary <string, int> arrName1, Dictionary <string, int> arrName2, Dictionary <string, int> arrName3, Dictionary <string, int> arrName4, bool null1, bool null2, bool null3)
        {
            if (total == 0)
            {
                if (null1)
                {
                    arrName1.Add(RouletteTable.PrintName(arr1[index1]), arr1[index1]);
                    arrName1.Add(RouletteTable.PrintName(arr1[index1 + 1]), arr1[index1]);
                }
                else if (null2)
                {
                    arrName1.Add(RouletteTable.PrintName(arr2[index2]), arr2[index2]);
                    arrName1.Add(RouletteTable.PrintName(arr2[index2 + 1]), arr2[index2 + 1]);
                }
                else if (null3)
                {
                    arrName1.Add(RouletteTable.PrintName(arr3[index3]), arr3[index3]);
                    arrName1.Add(RouletteTable.PrintName(arr3[index3 + 1]), arr3[index3 + 1]);
                }
            }

            else if (total == 11)
            {
                if (null1)
                {
                    arrName1.Add(RouletteTable.PrintName(arr1[index1]), arr1[index1]);
                    arrName1.Add(RouletteTable.PrintName(arr1[index1 - 1]), arr1[index1]);
                }
                else if (null2)
                {
                    arrName1.Add(RouletteTable.PrintName(arr2[index2]), arr2[index2]);
                    arrName1.Add(RouletteTable.PrintName(arr2[index2 - 1]), arr2[index2 - 1]);
                }
                else if (null3)
                {
                    arrName1.Add(RouletteTable.PrintName(arr3[index3]), arr3[index3]);
                    arrName1.Add(RouletteTable.PrintName(arr3[index3 - 1]), arr3[index3 - 1]);
                }
            }


            else if (null1)
            {
                arrName1.Add(RouletteTable.PrintName(arr1[index1]), arr1[index1]);
                arrName1.Add(RouletteTable.PrintName(arr1[index1 - 1]), arr1[index1]);

                arrName2.Add(RouletteTable.PrintName(arr2[index1]), arr2[index1]);
                arrName2.Add(RouletteTable.PrintName(arr2[index1 + 1]), arr2[index1]);
            }
            else if (null2)
            {
                arrName1.Add(RouletteTable.PrintName(arr2[index2]), arr2[index2]);
                arrName1.Add(RouletteTable.PrintName(arr2[index2 - 1]), arr2[index2 - 1]);

                arrName2.Add(RouletteTable.PrintName(arr2[index2]), arr2[index2]);
                arrName2.Add(RouletteTable.PrintName(arr2[index2 + 1]), arr2[index2 + 1]);
            }
            else if (null3)
            {
                arrName1.Add(RouletteTable.PrintName(arr3[index3]), arr3[index3]);
                arrName1.Add(RouletteTable.PrintName(arr3[index3 - 1]), arr3[index3 - 1]);

                arrName2.Add(RouletteTable.PrintName(arr3[index3]), arr3[index3]);
                arrName2.Add(RouletteTable.PrintName(arr3[index3 + 1]), arr3[index3 + 1]);
            }
            this.odds = 8;
            return(8, arrName1, arrName2, arrName3, arrName4);
        }