예제 #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Roulette! Feeling lucky, punk? \nLets find out!");
            RouletteBoard r = new RouletteBoard();

            r.Board();
            Menu B = new Menu();

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Starting Amount: $5,000");
            Console.ForegroundColor = ConsoleColor.White;
            Console.WriteLine("What do you want to do? (Choose one)");
            B.playerMenu();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Player.NewWallet();


            RouletteBoard board = new RouletteBoard();

            board.TestStuff();


            string menu    = $"What would you like to do?\n-1. Place bets\n-2. Roll for that big money\n-3. Exit";
            bool   playing = true;

            while (playing)
            {
                Console.WriteLine($"Cash: {Player.GetWallet()}");
                Console.WriteLine(menu);
                string input = Console.ReadLine();
                switch (input)
                {
                case "1":
                    board.PlaceBet();
                    break;

                case "2":
                    board.FindWinningBets();
                    break;

                case "3":
                    playing = false;
                    break;

                default:
                    Console.WriteLine("Invalid option");
                    break;
                }
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            var               rouletteBoard = RouletteBoard.CreateBoard();
            NumberBet         number        = new NumberBet();
            EvenOdd           evenOdd       = new EvenOdd();
            Colors            color         = new Colors();
            HighLow           highLow       = new HighLow();
            Dozens            dozen         = new Dozens();
            Columns           column        = new Columns();
            Streets           street        = new Streets();
            Random            rand          = new Random();
            DisplayWinner     winner        = new DisplayWinner();
            SpinTheWheel      wheel         = new SpinTheWheel();
            UserBet           bet           = new UserBet();
            DisplayBetOutcome result        = new DisplayBetOutcome();

            bet.DisplayTypeOfBet();
            bet.TypeOfBet();
            if (bet.userSelect == 1)
            {
                wheel.Spin(rand);
                winner.DisplayResult(wheel, rouletteBoard);
                result.IndividualNumberWin(wheel, number, rouletteBoard);
            }
            else if (bet.userSelect == 2)
            {
                wheel.Spin(rand);
                winner.DisplayResult(wheel, rouletteBoard);
                result.EvenOddWin(wheel, evenOdd, rouletteBoard);
            }
            else if (bet.userSelect == 3)
            {
                wheel.Spin(rand);
                winner.DisplayResult(wheel, rouletteBoard);
                result.RedBlackWin(wheel, color, rouletteBoard);
            }
            else if (bet.userSelect == 4)
            {
                wheel.Spin(rand);
                winner.DisplayResult(wheel, rouletteBoard);
                result.LowHighWin(wheel, highLow, rouletteBoard);
            }
            else if (bet.userSelect == 5)
            {
                wheel.Spin(rand);
                winner.DisplayResult(wheel, rouletteBoard);
                result.DozensWin(wheel, dozen, rouletteBoard);
            }
            else if (bet.userSelect == 6)
            {
                wheel.Spin(rand);
                winner.DisplayResult(wheel, rouletteBoard);
                result.ColumnsWin(wheel, column, rouletteBoard);
            }
            else if (bet.userSelect == 7)
            {
                wheel.Spin(rand);
                winner.DisplayResult(wheel, rouletteBoard);
                result.StreetWin(wheel, street, rouletteBoard);
            }
        }