private void PrintWinningBet(string bin) { bin = bin.Trim(); if (bin == "00" || bin == "37") { bin = "00"; } if (bin.Contains("-0")) { bin = "0"; } else { bool isValid = int.TryParse(bin, out int binNum); if (!isValid || !Bet.ValidateBet(binNum)) { Console.WriteLine("Invalid Input."); return; } if (binNum == 0) { bin = "0"; //get rid of the bug that input is 0000 } } Console.WriteLine($"The ball falls into {bin}."); Console.WriteLine("================================================="); Console.WriteLine($"Numbers Bet Winning Bet: {Bet.NumberBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"Evens/Odds Bet Winning Bet:{Bet.EvenOddBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"Lows/Highs Bet Winning Bet:{Bet.LowHighBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"Dozens Bet Winning Bet: {Bet.DozensBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"Columns Bet Winning Bet: {Bet.ColumnsBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"Street Bet Winning Bet: {Bet.StreetBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"6 Numbers Bet Winning Bet: \n{Bet.SixNumbersBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"Split Bet Winning Bet: \n{Bet.SplitBet(bin)}"); Console.WriteLine("================================================="); Console.WriteLine($"Corners Bet Winning Bet: \n{Bet.CornerBet(bin)}"); Console.WriteLine("================================================="); }
public static int[] Welcome() { try { bool even = true; bool low = true; string input = ""; Console.WriteLine("\n\nWELCOME TO ROULETTE! \nAre you ready to play?" + "\n\nSelect your betting option " + "(Attention: only include the digit number.)"); var option = LetsPlay(); switch (option) { case 1: Console.WriteLine("Enter a number: "); input = Console.ReadLine(); int[] playerNumber = { Int32.Parse(input) }; return(playerNumber); case 2: return(Bet.EvenOddBet(even)); case 3: return(Bet.EvenOddBet(!even)); case 4: int[] color = { 39 }; return(color); case 5: int[] colors = { 40 }; return(colors); case 6: return(Bet.LowHighBet(low)); case 7: return(Bet.LowHighBet(!low)); case 8: Console.WriteLine("\n\nOption 1: Dozen 1-12" + "\n\nOption 2: Dozen 13-24" + "\n\nOption 3: Dozen 25-36"); input = Console.ReadLine(); return(Bet.DozenBet(Int32.Parse(input))); case 9: Console.WriteLine("\n\nOption 1: First Column" + "\n\nOption 2: Second Column" + "\n\nOption 3: Third Column"); input = Console.ReadLine(); return(Bet.ColumnBet(Int32.Parse(input))); case 10: Console.WriteLine("\n\nOption 1: Street 1 - 3" + "\n\nOption 2: Street 4-6" + "\n\nOption 3: Street 7-9" + "\n\nOption 4: Street 10-12" + "\n\nOption 5: Street 13-15" + "\n\nOption 6: Street 16-18" + "\n\nOption 7: Street 19-21" + "\n\nOption 8: Street 22-24" + "\n\nOption 9: Street 25-27" + "\n\nOption 10: Street 28-30" + "\n\nOption 11: Street 31-33" + "\n\nOption 12: Street 34-36"); input = Console.ReadLine(); return(Bet.StreetBet(Int32.Parse(input))); case 11: Console.WriteLine("\n\nOption 1: Double Stree 1 - 6" + "\n\nOption 2: Double Stree 7-12" + "\n\nOption 3: Double Stree 13-18" + "\n\nOption 4: Double Stree 19-24" + "\n\nOption 5: Double Stree 25-30" + "\n\nOption 6: Double Stree 30-36"); input = Console.ReadLine(); return(Bet.DoubleStreetBet(Int32.Parse(input))); case 12: Console.WriteLine("Enter the first continuous numbers: "); input = Console.ReadLine(); Console.WriteLine("Enter the second continuous numbers: "); string str = Console.ReadLine(); return(Bet.SplitBet(Int32.Parse(input), Int32.Parse(str))); case 13: int count = 1; for (int i = 1; i <= 36; i++) { if (i % 3 != 0) //ignore multiple of three { Console.WriteLine($"\nOption {count}: Corner {i}, {i + 1}, {i + 3} {i + 4}"); count++; } } input = Console.ReadLine(); return(Bet.CornerBet(Int32.Parse(input))); default: return(playerNumber = null); } } catch (Exception ex) { Console.WriteLine(ex.Message); } return(null); }