hi,
i did the following for my loop
Code:
printf("Player one must play first"); //prompts player one to play first
do//first do
{
do //second do
{
printf("\n"); //goes on the next line
printf("\n");
printf("\n");
if(player2!=24) //player 2 is not equal to 24, then you enter the while loop
{
//die=GetRand(MIN,MAX); //assigns the result of rolling the dice to die
printf("Player 1:Please Press Enter to roll the dice");
die=GetRand(MIN,MAX);
getch();
printf("\n");
printf("You just rolled a %d ",die); //displays what you rolled
printf("\n");
player1=player1_move_spaces(game_board,die,player2); //calls function then assigns value to player1
printf("\n");
printf("\n");
if(die==6)
{
do//third do
{
printf("Player 1:Please Press Enter to roll the dice");
die=GetRand(MIN,MAX);
getch();
printf("\n");
printf("You just rolled a %d ",die); //displays what you rolled
printf("\n");
player1=player1_move_spaces(game_board,die,player2); //calls function then assigns value to player1
printf("\n");
}//end third do
while(die == 6);
}
But Now, if a player spins a 6, they do not get another chance. It just prompts the user to spin the dice for player2..................