I cant get my code to compile keeps having issues with the methods/classes...... im trying to build a roulette table
A bet is: The Player picks a particular number and commits one to as many chips as they have to that number.
The player is allowed to place a bet on as many particular numbers as they wish.
The rules of the game - described above - must be adhered to strictly.
All user input must be validated to be in its appropriate range.
A spin report must be displayed after each spin, stating the result of the spin (how much won, how much lost)
You must keep track of how many spins the Player plays.
You must keep track of how many bets the Player won on.
You must keep track of how many bets the Player lost on.
You must keep track of the number of times each number occurs as the result of a spin.
You must write and use a statistics report method which displays:
How many spins the Player played.
How many bets the Player won.
How many bets the Player lost.
For each number that was the result of a spin, how many times that number was the result of a spin.
The net winnings (or net losings) of the Player - Based off of starting with 500 chips.
any help would be appreciated and if you see something else thats wrong plz lemme know im sure its something simple that im overlookingpublic class Gameroulette { public static int main (String[] args) {static player theplayer; int theodds; Scanner scan = new Scanner(System.in); int num = (int)(Math.random()*theodds); //wheel modified to input int winnings = 0; int bet = 0; int x = 0, yesorno, counter = 1, p = 1; int willyouplay; int iamount = 500; //Initial Amount System.out.println("test"); System.out.print("Please enter wheel size : "); theodds = scan.nextInt(); theplayer = new player(theodds,iamount); //loop for the whole game while (counter == 1) { //Initial bet System.out.println("Would you like to place a Bet"); System.out.println("1. For bet"); System.out.println("2. to quit"); x = 0;//random variable for while looping while (x == 0){ //looping of menu System.out.print("Please enter choice : "); willyouplay = scan.nextInt(); if(willyouplay == 1 || willyouplay == 2) { x = 1; //increment of x so the loop stops thewheel(theodds, iamount, bet); } else if(willyouplay == 2){ System.out.println("You have quit"); break; } } } System.out.println("Would you like to play again?"); System.out.println("1. Yes"); System.out.println("2. No"); System.out.print("Enter choice : "); yesorno = scan.nextInt(); if (yesorno == 2) counter ++; System.out.println("test"); } static thewheel(int theodds,int iamount, int bet) { int num = (int)(Math.random()*theodds); Scanner scan1 = new Scanner(System.in); int numInnumber; int counterw; int counterl; int x=0; char c; System.out.print("How much will you bet? ");// bet placing bet = scan1.nextInt(); System.out.println(); x=0; while(x==0);// were i ask for multiple bets System.out.print("\tPlease enter your number(S) to bet on : "); int []number = new int[5]; for(int i =0; i <number.length;i++) { number[i]=scan1.nextInt(); System.out.print("If you want another number type y,if you want to spin s"); c = scan1.next().charAt(0); theplayer.setCurrentAmount(theplayer.getCurrentAmount()-bet); if(c =='y');{ // sees if you need to add another number to the array or spin the wheel number[i] = scan1.nextInt();} if (c== 's' && theplayer.setCurrentAmount>0){ // checks for the spin command and that the current amount of bets is greater then 0 x=1; } thewheel(theodds,iamount, bet); } for(int i =0; i <number.length;i++) { if (number[i] == num) // compares the random num to the bets { System.out.println("You Won"); bet = bet * theodds; counterw = counterw ++; System.out.println("You won " + bet ); theplayer.setCurrentAmount(theplayer.getCurrentAmount() + bet); System.out.println("Your current money is " + theplayer.getCurrentAmount()); System.out.println("wins:"+counterw + "Loss:"+ counterl); } else { counterl=counterl ++;//counts losses } System.out.println("You lost\n"); System.out.println("Your have " + theplayer.getCurrentAmount()); System.out.println("wins:"+counterw + "Loss:"+ counterl); } theplayer.setCurrentAmount(theplayer.getCurrentAmount() - 500); System.out.println("Net wins/losses " + theplayer.getCurrentAmount() ); } } class player { private int theodds1; private int initialAmount; private int currentAmount; public player(int theodds, int iamount) { theodds1 = theodds; setInitialAmount(iamount); setCurrentAmount(iamount); } public int gettheodds1() { return theodds1; } public int getInitialAmount() { return initialAmount; } public int getCurrentAmount() { return currentAmount; } private void setInitialAmount(int amt) { if(amt >= 0) initialAmount = amt; else initialAmount = 0; } public void setCurrentAmount(int amt) { if(amt >= 0) currentAmount = amt; else currentAmount = 0; } public int calcDifference() { return currentAmount - initialAmount; } }} }