import java.util.ArrayList;
import java.util.Random;
import java.util.Scanner;
public class JeopardyGame
{
public static void main(String args[])
{
Scanner input_letter = new Scanner(System.in);
ArrayList possiblevalues= new ArrayList() {{add(‘r’);add(‘h’);}};
int playerzdice=0;
int computerzdice=0;
int player_points=0;
int computer_points=0;
int max_points_in_a_turn_computer = 0; // maximum points thecomputer can get per turn.
boolean playerz_turn = true;//check if player’s turn.
while(player_points<100 || computer_points <100)
{
if(playerz_turn)
{
while(true)
{
System.out.println(“Gamer 1, you have “+player_points + ” pointsnow..in total. Plz enter”+possiblevalues+” where r to Roll, h tohold dice”);
char action = input_letter.next().charAt(0);
if(action == ‘r’)
{
playerzdice = rollDice();
System.out.println(“Gamer 1 you got ” + playerzdice);
if(playerzdice == 1)
{
System.out.println(“Gamer 1..Your Turn Over”);
playerzdice = 0;
player_points = 0;
playerz_turn =! playerz_turn;
break;
}
else
{
player_points=+playerzdice;
System.out.println(“Gamer 1 your total is ” +player_points);
}
}
else if(action == ‘h’) // if to hold
{
System.out.println(“Gamer 1’s current score is”+player_points);
playerz_turn
PayPal Gateway not configured
PayPal Gateway not configured