Пример #1
0
        //checks if the ball landed in an even or odd bin
        public void EvenOdd(int evenOdd)
        {
            PickBet bc = new PickBet();

            switch (evenOdd)
            {
            case 1:
                if (wa.BallFalls % 2 == 0)    //%2 is the remainder if divisible by in this case 2
                {
                    ThePlayer.Money += ((ThePlayer.Wager * 2) - ThePlayer.Wager);
                    Console.WriteLine($"You won ${ThePlayer.Wager * 2}!");
                    Console.WriteLine("Press enter...");
                }
                else
                {
                    ThePlayerLost();
                }
                break;

            case 2:
                if (wa.BallFalls % 2 != 0)     //%2 is the remainder if divisible by in this case 2
                {
                    ThePlayer.Money += ((ThePlayer.Wager * 2) - ThePlayer.Wager);
                    Console.WriteLine($"You won ${ThePlayer.Wager * 2}!");
                    Console.WriteLine("Press enter...");
                }
                else
                {
                    ThePlayerLost();
                }
                break;
            }
        }
Пример #2
0
        //number bet, checks if the specific number the ThePlayer is betting on gets called
        public void Number()
        {
            ThePlayer p = new ThePlayer();
            PickBet   b = new PickBet();

            if (b.binChoice == wa.BallFalls) //this by some real luck the ball lands in the bin, user bet multipled by 35
            {
                ThePlayer.Money += (ThePlayer.Wager * 35);
                Console.WriteLine($"You won ${ThePlayer.Wager * 35}!");
            }
            else
            {
                ThePlayerLost();
            }
        }