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; } }
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; } }
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); }
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) //} }
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; } }