for (int i = 0; i < NumberOfPlayers; i++)
{
NextMove = playerPositions[i] + DiceThrow();
while (RocketInSquare(NextMove) == true)
playerPositions[i] = NextMove++;
playerPositions[i] = NextMove;
}
I’m having some trouble with this for loop. Is there a way i can make the line :
NextMove = playerPositions[i] + DiceThrow();
Only run once in the for loop?
you should just move that line out of the loop.