for (int i = 0; i < NumberOfPlayers; i++)
{
NextMove = playerPositions[i] + DiceThrow();
while (RocketInSquare(NextMove) == true)
playerPositions[i] = NextMove++;
playerPositions[i] = NextMove;
}
我在这个 for 循环中遇到了一些麻烦。有没有办法让我做到这一点:
NextMove = playerPositions[i] + DiceThrow();
只在for循环中运行一次?