P: 1
Can you guys help me out? I'm trying to create a very simple game of craps but having some trouble. Below are the rules and requirements. Much appreciated!
Given the following rules for the game of Craps, simulate the play of a game, using the console to output the results of each roll and a WIN/LOSE message. Example output for a couple of runs is shown.
The player rolls two 6-sided dice (hint: use 1 + (int)(Math.random() * 6) ) to generate a random number between 1 and 6
A roll of 7 or 11 on the first try is a WIN
A roll of 2, 3 or 12 on the first try is a LOSE
Any other roll on the first try becomes the player's POINT
If a player rolled POINT, the player continues to roll until one of two things happens:
If a player in POINT rolls the POINT again, it is a WIN
If a player in POINT rolls 7, it is a LOSE
Example runs:
You rolled 7.
You win!
You rolled 12.
You lose!
You rolled 4. POINT is 4.
You rolled 3. POINT is 4.
You rolled 11. POINT is 4.
You rolled 4.
You win!

What I'm trying to do is create a Craps game based on the following instructions :

Code

Roll two dice. Each die has six faces representing values 1-6, respectively. Check the sum of the two dice. If the sum is 2, 3, or 12 (called craps), you lose; if the sum is 7 or 11 (called natural), you win; if the sum is another value (i.e., 4, 5, 6, 8, 9, or 10), a point is established. Continue to roll the dice until either a 7 or the same point value is rolled. If 7 is rolled, you lose. Otherwise, you win. The program should act as a single player.

Also, in Java just about all code (actually, all code, as far you're concerned at your stage of learning) must be inside of a method. So beginning on line 23 you're out of bounds:-) And there are a few other problems where I'm not sure what you're trying to do, like on line 9, or on line 15 where you're returning the undefined 'myroll' (should. Craps is a recreation of the popular dice game in JAVA. User starts with 10 credits - Player rolls the dice over and over until they either win or lose - Player begins a turn by rolling two dice, which is called `coming out` - Player will win 1 credit if the come out is a 7 or 11 - Player will lose 1 credit if the come out is 2, 3, or 12 - Otherwise, the `point` is set to the value of. Using Java create a craps game prompting users to play bets, tracking win / lose records. Keeping track of bet winnings and losses. If user doesn't have enough money to continue bets end game. The craps game has to follow these conditions, also prompt user to initiate each roll. After each game user can choose to continue or quit game. Lesson Code: to program dice rolls using JavaScript for. The New Player Welcome Bonuses are only available to players who create an account and make their first deposit at Vegas Hero. To be eligible to claim the New Player Welcome Bonuses, players must deposit a minimum of £10 in Craps Java Program Code one instance, for each bonus.

It seems as if my program never runs the public static int points(int sum) method along with the public static boolean youWin(int sum, int points) method??

Craps Code Java

Craps

for instance, when a 7 is initially rolled I was trying to make it prompt :

Craps Code Java Tutorial

{FULL PROJECT BELOW What I have written}