Question: Write a program that plays the dice game Pig. Pig is a two-player game where the players take turns repeatedly rolling a single 6-sided die;
Write a program that plays the dice game “Pig.” Pig is a two-player game where the players take turns repeatedly rolling a single 6-sided die; a player repeatedly rolls the die until one of two events occurs. Either the player chooses to stop rolling, in which case the sum of that player’s roll are added to his/her total points; or if the player rolls a 1 at any time, all points for that turn are lost and the turn ends immediately. The first player to reach a score of at least 100 points wins.
Step by Step Solution
3.43 Rating (166 Votes )
There are 3 Steps involved in it
public class Pig public static void mainString args Random rand new Random Scanner scan new ScannerSystemin SystemoutprintlnWelcome to the game of Pig ... View full answer
Get step-by-step solutions from verified subject matter experts
