Это мой java код, может кто-нибудь помочь мне изменить, пока l oop делать, а l oop in java, пожалуйста, спасибо :)
while (round<=25){
//Player takes turn
Player currPlayer = players.get(playerIdx);
int roll = currPlayer.getRoll();;
//Update the board
curr = currPlayer.getNextposition();
System.out.printf("%s\n",currPlayer.getName());
System.out.printf("Old: %d\n",currPlayer.getCurrposition());
System.out.printf("Dice: %d\n",currPlayer.getRoll());
System.out.printf("New: %d\n",currPlayer.getNextposition());
if(curr==100) {
menu=-1;
break;
}
Код похож на это? Я пытаюсь:
do{
Player currPlayer = players.get(playerIdx);
int roll = currPlayer.getRoll();;
curr = currPlayer.getNextposition();
System.out.printf("%s\n",currPlayer.getName());
System.out.printf("Old: %d\n",currPlayer.getCurrposition());
System.out.printf("Dice: %d\n",currPlayer.getRoll());
System.out.printf("New: %d\n",currPlayer.getNextposition());
if(curr==100) {
menu=-1;
break;
}while (round<=25)