class DiceGame
{
public static void main(String[] args)
{
int d1p1=(int)Math.ceil(Math.random()*6);
int d2p1=(int)Math.ceil(Math.random()*6);
int d1p2=(int)Math.ceil(Math.random()*6);
int d2p2=(int)Math.ceil(Math.random()*6);
int player1=0;
int player2=0;
System.out.println("________________________________________________________________________");
System.out.println("| Welcome to the Greatest Dice Game! |");
System.out.println("| Whichever player reaches a total of 100, wins the game! |");
System.out.println("| A small fee of your time is needed to play this game. |");
System.out.println("| Two players, please step up and your rolls will be determined. |");
System.out.println("________________________________________________________________________");
System.out.println("Player 1\t\t\t\tPlayer 2\n----------\t\t\t\t----------\n");
while(player1<=100 && player2 <=100)
{
d1p1=(int)Math.ceil(Math.random()*6);
d2p1=(int)Math.ceil(Math.random()*6);
d1p2=(int)Math.ceil(Math.random()*6);
d2p2=(int)Math.ceil(Math.random()*6);
player1+=d1p1+d2p1;
player2+=d1p2+d2p2;
System.out.println("["+d1p1+"]"+"["+d2p1+"] "+player1+" \t\t\t\t"+"["+d1p2+"]"+"["+d2p2+"] "+player2);
if(player1>=100)
{
System.out.println("Player 1 wins!");
System.out.println("Please come play again!");
}
else if(player2>=100)
{
System.out.println("\t\t\t\t\tPlayer 2 wins!");
System.out.println("\t\t\t\t\tPlease come play again!");
}
}
}
}