Пример #1
0
        public static void Main(string[] args)
        {
            Console.ForegroundColor = ConsoleColor.White;
            Console.BackgroundColor = ConsoleColor.Red;
            bool   Start;
            string doOver;

            while (Start = true && User.monies > 0)
            {
                Console.WriteLine();
                Console.WriteLine("So glad you came into the Ripoffski Casino. Select your game.");
                Console.WriteLine("1: Number Bet \n2: Evens or Odds \n3: Reds or Blacks \n4: Lows or Highs \n5: Dozens \n6: Columns \n7: Street \n8: 6 Numbers \n9: Split \n10: Corner");
                Console.Write("Pick a number! \n ");
                int gameChoice = Int32.Parse(Console.ReadLine());
                if (gameChoice > 10)
                {
                    Console.WriteLine("That's not a thing. ");
                    Console.ReadKey();
                    Console.Clear();
                }
                if (gameChoice == 1)
                {
                    Number number = new Number();
                    number.NumbersBet(Roll());
                }
                if (gameChoice == 2)
                {
                    EvenOrOdd evenorodd = new EvenOrOdd();
                    evenorodd.EvenOrOddBet(Roll());
                }
                if (gameChoice == 3)
                {
                    RedOrBlack redorblack = new RedOrBlack();
                    redorblack.RedOrBlackBet(Roll());
                }
                if (gameChoice == 4)
                {
                    LowsHighs loworhigh = new LowsHighs();
                    loworhigh.LowOrHighBet(Roll());
                }
                if (gameChoice == 5)
                {
                    Dozens dozens = new Dozens();
                    dozens.DozensBet(Roll());
                }
                if (gameChoice == 6)
                {
                    Columns columns = new Columns();
                    columns.ColumnBet(Roll());
                }
                if (gameChoice == 7)
                {
                    Street street = new Street();
                    street.StreetBet(Roll());
                }
                if (gameChoice == 8)
                {
                    SixNumbers sixNumbers = new SixNumbers();
                    sixNumbers.SixNumberBet(Roll());
                }
                if (gameChoice == 9)
                {
                    Split split = new Split();
                    split.SplitBet(Roll());
                }
                if (gameChoice == 10)
                {
                    Corner corner = new Corner();
                    corner.CornerBet(Roll());
                }
                if (User.monies == 0)
                {
                    Console.WriteLine("Hahahahahaahaha, you lost all your money! Go away!");
                    Start = false;
                }
                if (User.monies > 0)
                {
                    Console.Write(" Wanna try that again? (yes/no): ");
                    doOver = Console.ReadLine();
                    if (doOver == "yes")
                    {
                        Start = true;
                        Random random = new Random();
                        int    phrase = random.Next(1);
                        if (phrase == 1)
                        {
                            Console.WriteLine("You need professional help. Please. Your house is in foreclosure.");
                            Console.Clear();
                        }
                    }
                    else if (doOver == "no")
                    {
                        Start = false;
                        Console.WriteLine("Fine, you don't have much money anyway. Scardycat.");
                        Console.ReadKey();
                        Console.Clear();
                    }
                }
            }
        }
Пример #2
0
        public static void Main(string[] args)
        {
            bool   play;
            string playAgain;

            while (play = true && User.purse > 0)
            {
                Console.WriteLine();
                Console.WriteLine("Welcome to Roulette. Please reference the options below to select which bet you would like to make.");
                Console.WriteLine("(1) Number Bet \n(2) Evens or Odds \n(3) Reds or Blacks \n(4) Lows or Highs \n(5) Dozens \n(6) Columns \n(7) Street \n(8) 6 Numbers \n(9) Split \n(10) Corner");
                Console.Write("Please enter the number associated with the bet you wish to make: ");
                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(Roll());
                }
                if (chosenBet == 2)
                {
                    EvenOrOdd evenorodd = new EvenOrOdd();
                    evenorodd.EvenOrOddBet(Roll());
                }
                if (chosenBet == 3)
                {
                    RedOrBlack redorblack = new RedOrBlack();
                    redorblack.RedOrBlackBet(Roll());
                }
                if (chosenBet == 4)
                {
                    LowsHighs loworhigh = new LowsHighs();
                    loworhigh.LowOrHighBet(Roll());
                }
                if (chosenBet == 5)
                {
                    Dozens dozens = new Dozens();
                    dozens.DozensBet(Roll());
                }
                if (chosenBet == 6)
                {
                    Columns columns = new Columns();
                    columns.ColumnBet(Roll());
                }
                if (chosenBet == 7)
                {
                    Street street = new Street();
                    street.StreetBet(Roll());
                }
                if (chosenBet == 8)
                {
                    SixNumbers sixNumbers = new SixNumbers();
                    sixNumbers.SixNumberBet(Roll());
                }
                if (chosenBet == 9)
                {
                    Split split = new Split();
                    split.SplitBet(Roll());
                }
                if (chosenBet == 10)
                {
                    Corner corner = new Corner();
                    corner.CornerBet(Roll());
                }
                if (User.purse == 0)
                {
                    play = false;
                    Console.WriteLine("Thank you for playing. Good bye.");
                    Console.ReadKey();
                }
                if (User.purse > 0)
                {
                    Console.Write("Would you like to play again (yes/no): ");
                    playAgain = Console.ReadLine();
                    playAgain.ToLower();
                    if (playAgain == "yes")
                    {
                        play = true;
                        Random random = new Random();
                        int    phrase = random.Next(1, 3);
                        if (phrase == 1)
                        {
                            Console.WriteLine("You'll certainly win more this time!");
                        }
                        if (phrase == 2)
                        {
                            Console.WriteLine("Ah you like to live life on the edge. Fantastic lets play again!");
                        }
                        if (phrase == 3)
                        {
                            Console.WriteLine("Luck is for the unskilled. You must be a very lucky person.");
                        }
                    }
                    else if (playAgain == "no")
                    {
                        play = false;
                        Console.WriteLine("Thank you for playing. Good bye.");
                        Console.ReadKey();
                    }
                }
            }
        }