예제 #1
0
        public static string LowsOrHighs()
        {
            Console.WriteLine("Are you betting on lows or highs?");
            string LowOrHigh = Console.ReadLine(); string GameResult = "You lost!";

            int[] lows = The_Board.Lows(); int[] highs = The_Board.Highs();
            int   result = 5;

            Console.WriteLine($"Ball landed on {result}");
            if (LowOrHigh == "lows")
            {
                for (int x = 0; x < lows.Length; x++)
                {
                    if (result == lows[x])
                    {
                        GameResult = "You won!";
                    }
                }
            }
            else if (LowOrHigh == "highs")
            {
                for (int x = 0; x < highs.Length; x++)
                {
                    if (result == highs[x])
                    {
                        GameResult = "You won!";
                    }
                }
            }
            return(GameResult);
        }
예제 #2
0
        public static string Dozens()
        {
            Console.WriteLine("Enter which set of dozens you'll be betting on. \n 1-12 \t 13-24 \t 25-36\n");
            string UserDoz = Console.ReadLine(); string GameResult = "You lost!";

            int[] FirstDoz = The_Board.DozensRowOne(); int[] SecoundDoz = The_Board.DozensRowTwo(); int[] ThirdDoz = The_Board.DozensRowThree();
            int   spin = RandomNumberGen();

            Console.WriteLine($"Ball landed on {spin}");
            if (UserDoz == "1-12")
            {
                for (int x = 0; x < FirstDoz.Length; x++)
                {
                    if (spin == FirstDoz[x])
                    {
                        GameResult = "You won!";
                    }
                }
            }
            if (UserDoz == "13-24")
            {
                for (int x = 0; x < SecoundDoz.Length; x++)
                {
                    if (spin == SecoundDoz[x])
                    {
                        GameResult = "You won!";
                    }
                }
            }
            if (UserDoz == "25-36")
            {
                for (int x = 0; x < ThirdDoz.Length; x++)
                {
                    if (spin == ThirdDoz[x])
                    {
                        GameResult = "You won!";
                    }
                }
            }
            return(GameResult);
        }