Example #1
0
        static void Main()
        {
            Bets bets = new Bets();
            int  bin  = Game.Roulette.Spin();

            Console.WriteLine($"\n\nThe winning number is {bin}");
            Console.WriteLine($"\nEvens and odds: {bets.EvensOdds(bin)}");
            Console.WriteLine($"\nReds/Blacks: {bets.RedsOrBlacks(bin)}");
            Console.WriteLine($"\nLows/Highs: {bets.LowsAndHighs(bin)}");
            Console.WriteLine($"\nDozens: {bets.Dozens(bin)}");
            Console.WriteLine($"\nColumns: {bets.Columns(bin)}");
            Console.WriteLine($"\nStreets: {bets.Street(bin)}");
            Console.WriteLine($"\n6 Numbers: {bets.SixNumbers(bin)}");
            Console.WriteLine($"\nSplit: {bets.Split(bin)}");
            Console.WriteLine($"\nCorner: {bets.Corner(bin)}");
            Console.WriteLine("\n\nWould you like to spin again? Y/n");
            string input = Console.ReadLine();

            if (input.ToLower() == "y")
            {
                Main();
            }
            else
            {
                return;
            }
        }
        public static void Main(string[] args)
        {
            Console.WriteLine("\tProgram.Main()");
            Console.WriteLine("\nHello, welcome to Roulette! \n Please enter the amount of money you have.");
            string StrWallet = Console.ReadLine(); int Wallet = Bets.StringtoInt(StrWallet);

            while (Wallet <= 0)
            {
                Console.WriteLine("That is not a valid input! Try again!");
                StrWallet = Console.ReadLine(); Wallet = Bets.StringtoInt(StrWallet);
            }
            StartGame(Wallet);
        }
Example #3
0
        static void Main(string[] args)
        {
            Wheel wheel = new Wheel();
            Bets  bets  = new Bets();

            wheel.ball = wheel.GetNumber();
            wheel.GetRoll(wheel.ball);

            Console.WriteLine();
            bets.TotalBets(wheel);

            Console.ReadKey();
        }
Example #4
0
        static void GamePlay()
        {
            Bets   bets = new Bets();
            Random rand = new Random();
            int    n    = rand.Next(0, 38);

            Console.Write("Rolling ball .");
            Task.Delay(1000).Wait();
            Console.Write(".");
            Task.Delay(1000).Wait();
            Console.Write(".");
            Task.Delay(1000).Wait();

            bool zeros = bets.CheckZeros(n);

            if (zeros == true)
            {
                Console.ReadLine();
                Console.ReadLine();
                return;
            }
            if (zeros == false)
            {
                Console.WriteLine($"Ball landed on : {n}");
                bets.IndividualNumberBet(n);
                bets.EvenOdd(n);
                bets.RedOrBlack(n, bets.RedNumbers, bets.BlackNumbers);
                bets.LowOrHigh(n);
                bets.Dozens(n);
                bets.Columns(n);
                bets.Street(n);
                bets.DoubleStreet(n);
                bets.Split(n);
                bets.Corner(n);
                Console.ReadLine();
            }
            Console.WriteLine("Play again? y/n [n]:");
            string answer = Console.ReadLine();

            if (answer == "y")
            {
                Console.Clear();
                GamePlay();
            }
            else
            {
                return;
            }
        }
Example #5
0
        static void Main(string[] args)
        {
            Rolling Wheel  = new Rolling();
            Result  result = Wheel.Wheel();
            Bets    bets   = new Bets();

            bets.Number(result);

            Console.ReadLine();

            /*string[] Red = { "1", "3", "5", "7", "9", "12", "14", "16", "18", "19", "21", "23", "25", "27", "30", "32", "34", "36" };
             * string[] Black = { "2", "4", "6", "8", "10", "11", "13", "15", "17", "20", "22", "24", "26", "28", "29", "31", "33", "35" };
             * string[] Green = { "0", "00" };*/

            /*int[] Red = { 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36 };
             * int[] Black = { 2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35 };
             * int[] Green = { 0, 00 };*/
        }
Example #6
0
        static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine("   :::::::::       ::::::::      :::    :::       :::        ::::::::::   :::::::::::   :::::::::::       ::::::::::  ");
            Console.WriteLine("  :+:    :+:     :+:    :+:     :+:    :+:       :+:        :+:              :+:           :+:           :+:      ");
            Console.WriteLine(" +:+    +:+     +:+    +:+     +:+    +:+       +:+        +:+              +:+           +:+           +:+ ");
            Console.WriteLine(" +#++:++#:      +#+    +:+     +#+    +:+       +#+        +#++:++#         +#+           +#+           +#++:++#  ");
            Console.WriteLine(" +#+    +#+     +#+    +#+     +#+    +#+       +#+        +#+              +#+           +#+           +#+");
            Console.WriteLine(" #+#    #+#     #+#    #+#     #+#    #+#       #+#        #+#              #+#           #+#           #+#   ");
            Console.WriteLine("###    ###      ########       ########        ########## ##########       ###           ###           ##########   ");
            Console.ResetColor();
            Bin bin = Roll.Play();

            Console.ForegroundColor = ConsoleColor.DarkRed;
            Bets.BetOne(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Bets.BetTwo(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkRed;
            Bets.BetThree(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Bets.BetFour(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkRed;
            Bets.BetFive(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Bets.BetSix(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkRed;
            Bets.BetSeven(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Bets.BetEight(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkRed;
            Bets.BetNine(bin);
            Console.ResetColor();
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Bets.BetTen(bin);
            Console.ResetColor();
        }
Example #7
0
        static void Main(string[] args)
        {
            string b;

            do
            {
                Console.Clear();
                List <string> results   = new List <string>();
                Bets          gambeling = new Bets();
                results = gambeling.Gambeling();
                foreach (string a in results)
                {
                    Console.WriteLine(a);
                    Console.WriteLine("____________________________________________________________________|");
                }
                Console.WriteLine("\n\nDo you want to gamble again? Y/N");
                b = Console.ReadLine().ToLower();
            }while (b == "y");
            Console.ReadKey();
        }
Example #8
0
        static void Random()
        {
            Console.Clear();
            Bets   bet    = new Bets();
            Random random = new Random();

            int[] rednumber   = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35 };
            int[] blacknumber = { 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36 };

            var a = random.Next(0, 38);

            if (a != 0 && a != 37)
            {
                if (a < 17)
                {
                    int rresult;
                    rresult = rednumber[new Random().Next(0, rednumber.Length)];
                    Console.WriteLine($"Red {rresult}\n");
                    Bets.Indnumb(rresult);
                    Bets.Odd();
                    Bets.Red();
                    Bets.HiLo(rresult);
                    bet.Column(rresult);
                    bet.Street(rresult);
                    bet.DStreet(rresult);
                    bet.Split(rresult);
                    bet.Corner(rresult);
                }
                if (a > 16)
                {
                    int bresult;

                    bresult = blacknumber[new Random().Next(0, blacknumber.Length)];
                    Console.WriteLine($"Black {bresult}\n");
                    Bets.Indnumb(bresult);
                    Bets.Even();
                    bet.Black();
                    Bets.HiLo(bresult);
                    bet.Column(bresult);
                    bet.Street(bresult);
                    bet.DStreet(bresult);
                    bet.Split(bresult);
                    bet.Corner(bresult);
                }
            }
            if (a == 0)
            {
                Console.WriteLine("0\n");
                Bets.Indnumb(a);
                Bets.Zero();
                Bets.HiLo(a);
                bet.Column(a);
                bet.Street(a);
                bet.DStreet(a);
                bet.Split(a);
                bet.Corner(a);
            }
            if (a == 37)
            {
                Console.WriteLine("00 \n");
                int b = 37;
                Bets.Indnumb(b);
                Bets.Zero();
                Bets.HiLo(b);
                bet.Column(b);
                bet.Street(b);
                bet.DStreet(b);
                bet.Split(b);
                bet.Corner(a);
            }
            Console.WriteLine("\n\nWould you like a new number? \n\n\n [1] Yes\n\n [2] to exit ");
            double result;

            double.TryParse(Console.ReadLine(), out result);
            switch (result)
            {
            case 1:
                Random();
                return;

            case 2:
                Exit();
                return;

            default:
                Random();
                return;
            }
        }
        public static int PlayRoulette(int Wallet)
        {
            Console.Clear();
            Console.WriteLine("\nWhat would you like to play?\n \nNumbers,  Evens/Odds,  Reds/Blacks, " +
                              " Lows/Highs,  Dozens,  Columns,  Street,  6 Numbers,  Split,  or Corner.\n");
            string StrGameType = Console.ReadLine(); string result = "";
            string GameType = CheckRespone.GameType(StrGameType);

            Console.WriteLine($"How much would you like to bet? You have {Wallet}");
            string StrBet = Console.ReadLine(); int bet = Bets.StringtoInt(StrBet);

            while (bet < 0)
            {
                Console.WriteLine("That is not a valid number! Try again!");
                StrBet = Console.ReadLine(); bet = Bets.StringtoInt(StrBet);
            }
            while (Wallet < bet)
            {
                Console.WriteLine("You do not have that much money! Enter a amount you have!");
                StrBet = Console.ReadLine(); bet = Bets.StringtoInt(StrBet);
            }
            Wallet -= bet; Console.Clear();
            Console.WriteLine($"\nPlaying {GameType}");
            if (GameType == "Numbers")
            {
                result = Bets.Numbers(); //Pay 35 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 36);
                }
            }
            if (GameType == "Evens/Odds")
            {
                result = Bets.EvenOrOdds(); //Pays 1 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 2);
                }
            }
            if (GameType == "Reds/Blacks")
            {
                result = Bets.RedOrBlack(); //Pays 1 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 2);
                }
            }
            if (GameType == "Lows/Highs")
            {
                result = Bets.LowsOrHighs();//Pays 1 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 2);
                }
            }
            if (GameType == "Dozens")
            {
                result = Bets.Dozens(); //Pays 2 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 3);
                }
            }
            if (GameType == "Columns")
            {
                result = Bets.Columns(); //Pays 2 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 3);
                }
            }
            if (GameType == "Street")
            {
                result = Bets.Street(); //Pays 11 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 12);
                }
            }
            if (GameType == "6 Numbers")
            {
                result = Bets.SixNumbers();//Pays 5 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 6);
                }
            }
            if (GameType == "Split")
            {
                result = Bets.Split(); // Pays 17 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 18);
                }
            }
            if (GameType == "Corner")
            {
                result = Bets.Corner(); //Pays 8 to 1
                if (result == "You won!")
                {
                    Wallet += (bet * 9);
                }
            }
            Console.WriteLine(result);
            return(Wallet);
        }
Example #10
0
 public void Reset()
 {
     Bets.Clear();
     Winners.Clear();
     SpinHistory.Clear();
 }
Example #11
0
        static void Main()
        {
            Bets bets = new Bets();

            int[]    Numbers = new int [38];
            string[] Colors  = new string[38] {
                "green", "red", "black", "red", "black", "red", "black", "red", "black", "red", "black", "black", "red", "black",
                "red", "black", "red", "black", "red", "red", "black", "red", "black", "red", "black", "red", "black", "red", "black", "black", "red", "black", "red", "black",
                "red", "black", "red", "green"
            };
            string[] Number = new string[38] {
                "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22",
                "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "00"
            };
            string[,] Table = new string[3, 12]
            {
                { "3", "6", "9", "12", "15", "18", "21", "24", "27", "30", "33", "36" },
                { "2", "5", "8", "11", "14", "17", "20", "23", "26", "29", "32", "35" },
                { "1", "4", "7", "10", "13", "16", "19", "22", "25", "28", "31", "34" }
            };
            Random r = new Random();

            int ball = r.Next(0, 38);

            Console.WriteLine($"Choose your bet:\n" +
                              $"[1] Numbers\n" +
                              $"[2] Even/Odds\n" +
                              $"[3] Reds/Blacks\n" +
                              $"[4] Lows/Highs\n" +
                              $"[5] Dozens\n" +
                              $"[6] Columns\n" +
                              $"[7] Street\n" +
                              $"[8] 6 Numbers\n" +
                              $"[9] Split\n" +
                              $"[10] Corner\n");

            int choice = int.Parse(Console.ReadLine());

            switch (choice)
            {
            case (1):
            {
                Console.WriteLine("Call a number: 1 - 36");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.NumbersBet(ball, option, Numbers));
                break;
            }

            case (2):
            {
                Console.WriteLine("even or odds?\n" +
                                  "[1] even\n" +
                                  "[2] odd\n");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.EvenOdds(ball, option, Numbers));
                break;
            }

            case (3):
            {
                Console.WriteLine("black or red?\n" +
                                  "[1] black\n" +
                                  "[2] red\n");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.RedBlack(ball, option, Colors));
                break;
            }

            case (4):
            {
                Console.WriteLine("Lows or Highs?\n" +
                                  "[1] Lows\n" +
                                  "[2] Highs\n");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.LowHigh(ball, option, Number));
                break;
            }

            case (5):
            {
                Console.WriteLine("Pick a dozen\n" +
                                  "[1] 1-12\n" +
                                  "[2] 13-34\n" +
                                  "[3] 25-36\n");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.Dozens(ball, option, Number));
                break;
            }

            case (6):
            {
                Console.WriteLine("Pick a column\n" +
                                  "[1] Contains (1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34\n" +
                                  "[2] Contains (2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35\n" +
                                  "[3] Contains (3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36\n");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.Columns(ball, option, Number));
                break;
            }

            case (7):
            {
                Console.WriteLine("Pick a row\n" +
                                  "[1] 1,2,3\n" +
                                  "[2] 4,5,6\n" +
                                  "[3] 7,8,9\n" +
                                  "[4] 10,11,12\n" +
                                  "[5] 13,14,15\n" +
                                  "[6] 16,17,18\n" +
                                  "[7] 19,20,21\n" +
                                  "[8] 22,23,24\n" +
                                  "[9] 25,26,27\n" +
                                  "[10] 28,29,30\n" +
                                  "[11] 31,32,33\n" +
                                  "[12] 34,35,36\n");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.Streets(ball, option, Number));
                break;
            }

            case (8):
            {
                Console.WriteLine("Pick a double row\n\n" +
                                  "[1] 1,2,3 and 4,5,6\n" +
                                  "[2] 4,5,6 and 7,8,9\n" +
                                  "[3] 7,8,9 and 10,11,12\n" +
                                  "[4] 10,11,12 and 13,14,15\n" +
                                  "[5] 13,14,15 and 16,17,18\n" +
                                  "[6] 16,17,18 and 19,20,21\n" +
                                  "[7] 19,20,21 and 22,23,24\n" +
                                  "[8] 22,23,24 and 25,26,27\n" +
                                  "[9] 25,26,27 and 28,29,30\n" +
                                  "[10] 28,29,30 and 31,32,33\n" +
                                  "[11] 31,32,33 and 34,35,36\n");
                int option = int.Parse(Console.ReadLine());
                Console.WriteLine(bets.SixNumbers(ball, option, Number));
                break;
            }

            case (9):
            {
                Console.WriteLine("pick two contiguous numbers\n" +
                                  "3", "6", "9", "12", "15", "18", "21", "24", "27", "30", "33", "36\n" +
                                  "2", "5", "8", "11", "14", "17", "20", "23", "26", "29", "32", "35\n" +
                                  "1", "4", "7", "10", "13", "16", "19", "22", "25", "28", "31", "34\n" +
                                  "Enter your first number\n");
                int opt1 = int.Parse(Console.ReadLine());
                Console.WriteLine("Enter your second number");
                int opt2 = int.Parse(Console.ReadLine());
                Console.WriteLine("This bet is still under construction");


                break;
            }

            case (10):
            {
                Console.WriteLine("This bet is still under construction");
                break;
            }
            }

            Main();

            //void Validator(int opt1 , int opt2, string [,] table)
            //{
            //    if (opt1 == opt2)
            //}
        }
Example #12
0
        public static void Play()
        {
            Gamble   gamble       = new Gamble();
            int      typeOfGamble = gamble.WhatKindOfBet();
            TheWheel wheel        = new TheWheel();

            int[]  ball      = wheel.Spin();
            int    whatColor = ball[0];
            int    landed    = wheel.Lands(ball);
            string color     = wheel.RedOrBlack(whatColor).ToLower();
            Bets   playerBet = new Bets();


            bool youWon;

            switch (typeOfGamble)
            {
            case 1:
                youWon = playerBet.NumbersBet(landed);
                if (youWon == true)
                {
                    Console.WriteLine("WINNER");
                }
                else
                {
                    Console.WriteLine("OH Maybe Next Time!");
                }
                break;

            case 2:
                youWon = playerBet.EvenOdd(landed);
                if (youWon == true)
                {
                    Console.WriteLine("WINNER");
                }
                else
                {
                    Console.WriteLine("OH Maybe Next Time!");
                }
                break;

            case 3:
                youWon = playerBet.ColorLandedOn(color, landed);
                if (youWon == true)
                {
                    Console.WriteLine("WINNER");
                }
                else
                {
                    Console.WriteLine("OH Maybe Next Time!");
                }
                break;

            case 4:
                youWon = playerBet.LowHigh(landed);
                if (youWon == true)
                {
                    Console.WriteLine("WINNER");
                }
                else
                {
                    Console.WriteLine("OH Maybe Next Time!");
                }
                break;

            case 5:
                youWon = playerBet.Dozens(landed);
                if (youWon == true)
                {
                    Console.WriteLine("WINNER");
                }
                else
                {
                    Console.WriteLine("OH Maybe Next Time!");
                }
                break;

            case 6:
                youWon = playerBet.Colums(landed);
                if (youWon == true)
                {
                    Console.WriteLine("WINNER");
                }
                else
                {
                    Console.WriteLine("OH Maybe Next Time!");
                }
                break;

            case 7:
                youWon = playerBet.Streets(landed);
                if (youWon == true)
                {
                    Console.WriteLine("WINNER");
                }
                else
                {
                    Console.WriteLine("OH Maybe Next Time!");
                }
                break;
            }
        }