public void Doubles(Result result) { Bets bet = new Bets(); for (int i = 0; i < ColunmOne.Length; i++) { if (result.Number == ColunmOne[i]) { if (result.Number == 1) { Console.WriteLine($"You won double rows : {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}, {ColunmOne[i] + 3}, {ColunmTwo[i] + 3}, {ColunmThree[i] + 3}"); } else if (result.Number == 34) { Console.WriteLine($"You won double rows : {ColunmOne[i] - 3}, {ColunmTwo[i] - 3}, {ColunmThree[i] - 3} {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]} "); } else { Console.WriteLine($"You won double rows : {ColunmOne[i] - 3}, {ColunmTwo[i] - 3}, {ColunmThree[i] - 3} {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]} and {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}, {ColunmOne[i] + 3}, {ColunmTwo[i] + 3}, {ColunmThree[i] + 3}"); } } } for (int i = 0; i < ColunmTwo.Length; i++) { if (result.Number == ColunmTwo[i]) { if (result.Number == 2) { Console.WriteLine($"You won double rows : {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}, {ColunmOne[i] + 3}, {ColunmTwo[i] + 3}, {ColunmThree[i] + 3}"); } else if (result.Number == 35) { Console.WriteLine($"You won double rows : {ColunmOne[i] - 3}, {ColunmTwo[i] - 3}, {ColunmThree[i] - 3} {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]} "); } else { Console.WriteLine($"You won double rows : {ColunmOne[i] - 3}, {ColunmTwo[i] - 3}, {ColunmThree[i] - 3} {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]} and {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}, {ColunmOne[i] + 3}, {ColunmTwo[i] + 3}, {ColunmThree[i] + 3}"); } } } for (int i = 0; i < ColunmThree.Length; i++) { if (result.Number == ColunmThree[i]) { if (result.Number == 3) { Console.WriteLine($"You won double rows : {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}, {ColunmOne[i] + 3}, {ColunmTwo[i] + 3}, {ColunmThree[i] + 3}"); } else if (result.Number == 36) { Console.WriteLine($"You won double rows : {ColunmOne[i] - 3}, {ColunmTwo[i] - 3}, {ColunmThree[i] - 3} {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]} "); } else { Console.WriteLine($"You won double rows : {ColunmOne[i] - 3}, {ColunmTwo[i] - 3}, {ColunmThree[i] - 3} {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]} and {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}, {ColunmOne[i] + 3}, {ColunmTwo[i] + 3}, {ColunmThree[i] + 3}"); } } } bet.Split(result); }
public void Streets(Result result) { Bets bet = new Bets(); for (int i = 0; i < ColunmOne.Length; i++) { if (result.Number == ColunmOne[i]) { Console.WriteLine($"You won street : {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}"); } } for (int i = 0; i < ColunmTwo.Length; i++) { if (result.Number == ColunmTwo[i]) { Console.WriteLine($"You won street : {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}"); } } for (int i = 0; i < ColunmThree.Length; i++) { if (result.Number == ColunmThree[i]) { Console.WriteLine($"You won street : {ColunmOne[i]}, {ColunmTwo[i]}, {ColunmThree[i]}"); } } bet.Doubles(result); }
public void Color(Result result) { Bets bet = new Bets(); Console.WriteLine($"You won {result.Color}"); bet.LowsHighs(result); }
public void Number(Result result) { Bets bet = new Bets(); Console.WriteLine($"You won {result.Number}"); bet.EvenOdds(result); }
public void LowsHighs(Result result) { Bets bet = new Bets(); if (result.Number <= 18) { Console.WriteLine($"You won lows 1 - 18"); } else { Console.WriteLine($"You won highs 19 - 36"); } bet.Dozens(result); }
public void EvenOdds(Result result) { Bets bet = new Bets(); if (result.Number % 2 == 0) { Console.WriteLine($"You won even"); } else { Console.WriteLine($"You won odds"); } bet.Color(result); }
public void Dozens(Result result) { Bets bet = new Bets(); if (result.Number <= 12) { Console.WriteLine($"You won 1 - 12 dozens"); } if (result.Number >= 13 && result.Number <= 24) { Console.WriteLine($"You won 13 - 24 dozens"); } if (result.Number >= 25) { Console.WriteLine($"You won 25 - 36 dozens"); } bet.Colunms(result); }
public void Colunms(Result result) { Bets bet = new Bets(); if (ColunmOne.Any(x => x.Equals(result.Number))) { Console.WriteLine($"You won first column (1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34)"); } if (ColunmTwo.Any(x => x.Equals(result.Number))) { Console.WriteLine($"You won second column (2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35)"); } if (ColunmThree.Any(x => x.Equals(result.Number))) { Console.WriteLine($"You won third column (3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36)"); } bet.Streets(result); }
public void Zeros(Result result) { Bets bet = new Bets(); Rolling Roll = new Rolling(); if (result.Number == 37) { Console.WriteLine($"You won 0"); Console.ReadLine(); Roll.Wheel(); } if (result.Number == 38) { Console.WriteLine($"You won 00"); Console.ReadLine(); Roll.Wheel(); } else { bet.Number(result); } }
public Result Wheel() { Rolling Wheel = new Rolling(); Bets bet = new Bets(); Result result = new Result(); string Input = "0"; while (Input != "N") { Console.Clear(); Console.WriteLine($"Welcome to roulette! Press any button to roll the wheel!"); Console.ReadLine(); Console.WriteLine($"Rolling the wheel!"); Console.WriteLine($""); int[] AllNumbers = { 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, 37, 38 }; int[] Red = { 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36 }; int[] Black = { 2, 4, 6, 8, 10, 11, 13, 15, 17, 20, 22, 24, 26, 28, 29, 31, 33, 35 }; Random rand = new Random(); var Number = rand.Next(1, AllNumbers.Length); if (Red.Any(x => x.Equals(Number))) { result.Color = "Red"; result.Number = Number; } else { result.Color = "Black"; result.Number = Number; } if (result.Number == 37) { Console.WriteLine($"You landed on 0"); Console.ReadLine(); } if (result.Number == 38) { Console.WriteLine($"You landed on 00"); Console.ReadLine(); } else { Console.WriteLine($"You landed on {result.Color} {result.Number}"); Console.ReadLine(); bet.Zeros(result); Console.WriteLine($"would you like to roll agian?"); Console.WriteLine($"Y/N"); Input = Console.ReadLine(); } if (Input == "Y") { Wheel.Wheel(); } if (Input == "N") { Console.WriteLine($"Thanks for playing!"); Console.ReadLine(); Environment.Exit(0); } return(result); } return(result); }