public void Action(int AmountOfBets, int MinBid) { int BidOn = 0; int bid = MinBid; int BalanceInf = BetInfo.Balance; int wins = 0; for (int i = 0; i < AmountOfBets; i++) { BotColorBet.Betting(BidOn, bid); if (BalanceInf + bid == BetInfo.Balance) { if (BidOn == 0) { BidOn = 1; } else { BidOn = 0; } if ((bid - MinBid) >= MinBid) { bid -= MinBid; } wins++; } else { bid += MinBid; } BalanceInf = BetInfo.Balance; } int DisplayBalance = BetInfo.Balance; int DisplayAmountOfBets = BetInfo.AmountOfBets; Console.WriteLine("\n\n\n\n"); Console.WriteLine("Total Profit " + DisplayBalance); Console.WriteLine("Amount of bets " + DisplayAmountOfBets); Console.WriteLine("Amount of wins " + wins); }
public void BettingMenu() { for (; ;) { int DisplayBalance = BetInfo.Balance; int DisplayAmountOfBets = BetInfo.AmountOfBets; int DisplayProfit = BetInfo.Profit; Console.WriteLine("1 - " + "Stright Bet" + " Info:"); Console.WriteLine("2 - " + "Red or Black Bet" + " Balance: " + DisplayBalance); Console.WriteLine("3 - " + "Even or Odd Bet" + " Amount of bets: " + DisplayAmountOfBets); Console.WriteLine("4 - " + "Dozen Bet" + " Total Profit: " + DisplayProfit); Console.WriteLine("5 - " + "Column Bet"); Console.WriteLine("6 - " + "Exit"); choice_nd = Convert.ToInt32(Console.ReadLine()); if (choice_nd == 1) { Console.Clear(); Console.WriteLine("Enter the numbers you want to bet on and bet amount"); BetOn = Convert.ToInt32(Console.ReadLine()); BetAmount = Convert.ToInt32(Console.ReadLine()); Console.Clear(); NumberBetting.Betting(BetOn, BetAmount); } else if (choice_nd == 2) { Console.Clear(); Console.WriteLine("Enter the color you want to bet(0 is red, 1 is black) on and bet amount"); BetOn = Convert.ToInt32(Console.ReadLine()); BetAmount = Convert.ToInt32(Console.ReadLine()); Console.Clear(); ColorBetting.Betting(BetOn, BetAmount); } else if (choice_nd == 3) { Console.Clear(); Console.WriteLine("Enter the parity you want to bet(0 - even, 1 - odd) on and bet amount"); BetOn = Convert.ToInt32(Console.ReadLine()); BetAmount = Convert.ToInt32(Console.ReadLine()); Console.Clear(); ParityBetting.Betting(BetOn, BetAmount); } else if (choice_nd == 4) { Console.Clear(); Console.WriteLine("Enter the dozen you want to bet on and bet amount"); BetOn = Convert.ToInt32(Console.ReadLine()); BetAmount = Convert.ToInt32(Console.ReadLine()); Console.Clear(); DozenBetting.Betting(BetOn, BetAmount); } else if (choice_nd == 5) { Console.Clear(); Console.WriteLine("Enter the column you want to bet on and bet amount"); BetOn = Convert.ToInt32(Console.ReadLine()); BetAmount = Convert.ToInt32(Console.ReadLine()); Console.Clear(); ColumnBetting.Betting(BetOn, BetAmount); } else if (choice_nd == 6) { Console.Clear(); exit = true; break; } else { Console.Clear(); } } }