Esempio n. 1
0
        //Weather weather;
        public void Play()
        {
            bool   play;
            string playAgain;

            //Moved this to the opening screen in program.
            //weather = new Weather();
            //weather.SetRealWeatherAsync();

            while (play = true && Player.money > 0)
            {
                Console.Clear();
                DisplayTable();
                WriteText.WriteLine("");
                WriteText.WriteLine("");
                WriteText.WriteLine("");

                //Console.WriteLine("The Temperture today is {0} degrees and {1} today.", weather.Temperature, weather.WeatherEffect);
                WriteText.WriteLine($"Choose a number cooresponding to the bet you'd like to make\n" +
                                    $"1: bet on a number(1/36 odds)\t 2: Even or Odds(1/2 odds)\t 3: Red or Black(1/2 odds)\n" +
                                    $"4: Lows or Highs(1/2 odds)\t 5: Dozens(1/3 odds)\t 6: Column bet(1/3 odds)\n" +
                                    $"7: Street(1/12 odds)\t 8: six-line(1/6 odds)\t 9: Split(1/18 odds)\n" +
                                    $"10: Corner bet(1/9 odds)", ConsoleColor.Green);
                int chosenBet = Int32.Parse(Console.ReadLine());
                if (chosenBet > 10)
                {
                    throw new IndexOutOfRangeException("You chose a number that does not correspond with any of the bets.");
                }
                if (chosenBet == 1)
                {
                    Number number = new Number();
                    number.NumbersBet(Spin());
                }
                if (chosenBet == 2)
                {
                    EvenOrOdd evenorodd = new EvenOrOdd();
                    evenorodd.EvenOrOddBet(Spin());
                }
                if (chosenBet == 3)
                {
                    RedOrBlack redorblack = new RedOrBlack();
                    redorblack.RedOrBlackBet(Spin());
                }
                if (chosenBet == 4)
                {
                    LowsHighs loworhigh = new LowsHighs();
                    loworhigh.LowOrHighBet(Spin());
                }
                if (chosenBet == 5)
                {
                    Dozens dozens = new Dozens();
                    dozens.DozensBet(Spin());
                }
                if (chosenBet == 6)
                {
                    Columns columns = new Columns();
                    columns.ColumnBet(Spin());
                }
                if (chosenBet == 7)
                {
                    Street street = new Street();
                    street.StreetBet(Spin());
                }
                if (chosenBet == 8)
                {
                    SixLine sixLine = new SixLine();
                    sixLine.SixLineBet(Spin());
                }
                if (chosenBet == 9)
                {
                    Split split = new Split();
                    split.SplitBet(Spin());
                }
                if (chosenBet == 10)
                {
                    Corner corner = new Corner();
                    corner.CornerBet(Spin());
                }
                if (Player.money == 0)
                {
                    play = false;
                    WriteText.WriteLine("Thank you for playing. Good bye.", ConsoleColor.Red);
                    Console.ReadKey();
                }
                if (Player.money > 0)
                {
                    WriteText.WriteLine("Would you like to play again (yes/no): ", ConsoleColor.Red);
                    playAgain = Console.ReadLine();
                    playAgain.ToLower();
                    if (playAgain == "yes")
                    {
                        play = true;
                        Random random = new Random();
                        int    phrase = random.Next(1, 3);
                        if (phrase == 1)
                        {
                            WriteText.WriteLine("You'll certainly win more this time!", ConsoleColor.Red);
                        }
                        if (phrase == 2)
                        {
                            WriteText.WriteLine("Ah you like to live life on the edge. Fantastic lets play again!", ConsoleColor.Red);
                        }
                        if (phrase == 3)
                        {
                            WriteText.WriteLine("Luck is for the unskilled. You must be a very lucky person.", ConsoleColor.Red);
                        }
                    }
                    else if (playAgain == "no")
                    {
                        play = false;
                        WriteText.WriteLine("Thank you for playing. Good bye.", ConsoleColor.Red);
                        Console.ReadKey();
                    }
                }
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            int Funds = 500;

            do
            {
Start:
                Console.WriteLine($"You have ${Funds}.");

                Console.WriteLine("Place your bet!");

                Console.WriteLine("[1 for Numbers]-[2 for Evens/Odds]-[3 for Reds/Blacks]-[4 for Lows/Highs]-[5 for Dozens]\n" +
                                  "[6 for Columns]-[7 for Street]-[8 for 6 Numbers]-[9 for Split]-[10 for Corner]-[0 to Quit]");
                string UserInput = Console.ReadLine();

                if (UserInput == "1")
                {
                    Console.WriteLine("The payout is 35:1.");
                    Numbers n = new Numbers();
                    Funds = n.NumbersBet(Funds);
                }
                if (UserInput == "2")
                {
                    Console.WriteLine("The payout is 1:1.");
                    EvensOdds e = new EvensOdds();
                    Funds = e.EvensOddsBet(Funds);
                }
                if (UserInput == "3")
                {
                    Console.WriteLine("The payout is 1:1.");
                    RedsBlacks r = new RedsBlacks();
                    Funds = r.RedsBlacksBet(Funds);
                }
                if (UserInput == "4")
                {
                    Console.WriteLine("The payout is 1:1.");
                    LowsHighs l = new LowsHighs();
                    Funds = l.LowsHighsBet(Funds);
                }
                if (UserInput == "5")
                {
                    Console.WriteLine("The payout is 2:1.");
                    Dozens d = new Dozens();
                    Funds = d.DozensBet(Funds);
                }
                if (UserInput == "6")
                {
                    Console.WriteLine("The payout is 2:1.");
                    Columns c = new Columns();
                    Funds = c.ColumnsBet(Funds);
                }
                if (UserInput == "7")
                {
                    Console.WriteLine("The payout is 11:1.");
                    Street s = new Street();
                    Funds = s.StreetBet(Funds);
                }
                if (UserInput == "8")
                {
                    Console.WriteLine("The payout is 5:1.");
                    SixNumbers s = new SixNumbers();
                    Funds = s.SixNumbersBet(Funds);
                }
                if (UserInput == "9")
                {
                    Console.WriteLine("The payout is 17:1.");
                    Split s = new Split();
                    Funds = s.SplitBet(Funds);
                }
                if (UserInput == "10")
                {
                    Console.WriteLine("The payout is 8:1.");
                    Corner c = new Corner();
                    Funds = c.CornerBet(Funds);
                }
                if (UserInput == "0")
                {
                    Console.WriteLine("Thanks for playing!");
                    Environment.Exit(0);
                }
                else
                {
                    if (Funds == 0)
                    {
                        Console.WriteLine("No money!? You don't have to go home, but you can't stay here...");
                        Environment.Exit(0);
                    }
                    goto Start;
                }
            }while (Funds >= 1);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Digital Roulette.");
            Console.WriteLine("If you don't know how to play start by making a selection below and rules will be explained as you go.");

            while (true)
            {
                Console.WriteLine("Please select a number in acordance to the type of bet you would like to place.");
                Console.WriteLine(@"
                1. Single Number
                2. Even or Odd Number
                3. Red or Black Numbers
                4. Low or High Numbers
                5. Groups of 12 Numbers
                6. Column of Numbers
                7. Street of Numbers
                8. Groups of 6 Numbers
                9. Split, any 2 contiguous Numbers
                10. Corner, any intersection of 4 contiguous Numbers" @);

                int type = Convert.ToInt32(Console.ReadLine());

                if (type == 1)
                {
                    Number num = new Number();
                    num.One();
                }
                else if (type == 2)
                {
                    EvenOdd evenOdd = new EvenOdd();
                    evenOdd.EvOd();
                }
                else if (type == 3)
                {
                    RedBlack redBlack = new RedBlack();
                    redBlack.Color();
                }
                else if (type == 4)
                {
                    LowHigh lowHigh = new LowHigh();
                    lowHigh.loHi();
                }
                else if (type == 5)
                {
                    Dozens dozens = new Dozens();
                    dozens.Doz();
                }
                else if (type == 6)
                {
                    Columns columns = new Columns();
                    columns.Col();
                }
                else if (type == 7)
                {
                    Street street = new Street();
                    street.St();
                }
                else if (type == 8)
                {
                    HalfDozen halfDozen = new HalfDozen();
                    halfDozen.Half();
                }
                else if (type == 9)
                {
                    Split split = new Split();
                    split.Twos();
                }
                else if (type == 10)
                {
                    Corner corner = new Corner();
                    corner.Fours();
                }

                Console.WriteLine("Would you like to make another bet?         (y/n)");
                string replay = Console.ReadLine();

                if (replay == "n")
                {
                    Console.WriteLine("Thank you for playing.");
                    break;
                }

                Console.Clear();
            }
        }
Esempio n. 4
0
        public void Run()
        {
            Table table = new Table();

            table.Coloring();
            Numbers   numbers    = new Numbers();
            EvenOdd   evenOdd    = new EvenOdd();
            RedBlack  redsBlacks = new RedBlack();
            HighLow   highLow    = new HighLow();
            Dozens    dozens     = new Dozens();
            Column    column     = new Column();
            Street    street     = new Street();
            SixNumber sixNumber  = new SixNumber();
            Split     split      = new Split();
            Corner    corner     = new Corner();

            ConsoleKeyInfo cki;

            Console.WriteLine("\nHow would you like to bet: ");
            Console.WriteLine("\n1. Straight Bet\t2. Evens/Odds\t3. Reds/Blacks\t4. Lows/Highs\t5. Dozens\n\n" +
                              "6. Columns\t7. Street\t8. 6 Numbers\t9. Split\t0. Corner");

            for (int i = 0; i < 10; i++)
            {
                cki = Console.ReadKey(true);
                switch (cki.Key)
                {
                case ConsoleKey.D1:
                    numbers.WinOne();
                    break;

                case ConsoleKey.D2:
                    Console.WriteLine("\nE: Even\t\tO: Odd");
                    cki = Console.ReadKey(true);
                    if (cki.Key == ConsoleKey.E)
                    {
                        evenOdd.WinOne();
                    }
                    else if (cki.Key == ConsoleKey.O)
                    {
                        evenOdd.WinTwo();
                    }
                    else
                    {
                        Console.WriteLine("Invalid Input");
                    }
                    break;

                case ConsoleKey.D3:
                    Console.WriteLine("\nPick a color\n");
                    Console.WriteLine("R: Red\t\tB: Black");
                    cki = Console.ReadKey(true);
                    if (cki.Key == ConsoleKey.R)
                    {
                        redsBlacks.WinOne();
                    }
                    else if (cki.Key == ConsoleKey.B)
                    {
                        redsBlacks.WinTwo();
                    }
                    else
                    {
                        Console.WriteLine("Invalid Input");
                    }
                    break;

                case ConsoleKey.D4:
                    Console.WriteLine("\nL: 1-18\t\tH: 19-36");
                    cki = Console.ReadKey(true);
                    if (cki.Key == ConsoleKey.L)
                    {
                        highLow.WinOne();
                    }
                    else if (cki.Key == ConsoleKey.H)
                    {
                        highLow.WinTwo();
                    }
                    else
                    {
                        Console.WriteLine("Invalid Input");
                    }
                    break;

                case ConsoleKey.D5:
                    Console.WriteLine("\nF: 1-12\tS: 13-24\tT: 25-36");
                    cki = Console.ReadKey(true);
                    if (cki.Key == ConsoleKey.F)
                    {
                        dozens.WinOne();
                    }
                    else if (cki.Key == ConsoleKey.S)
                    {
                        dozens.WinTwo();
                    }
                    else if (cki.Key == ConsoleKey.T)
                    {
                        dozens.WinThree();
                    }
                    else
                    {
                        Console.WriteLine("Invalid Input");
                    }
                    break;

                case ConsoleKey.D6:
                    column.WinOne();
                    break;

                case ConsoleKey.D7:
                    street.WinOne();
                    break;

                case ConsoleKey.D8:
                    sixNumber.WinOne();
                    break;

                case ConsoleKey.D9:
                    split.WinOne();
                    break;

                case ConsoleKey.D0:
                    corner.WinOne();
                    break;
                }
            }
        }