nbl
public java v1 · immutable int[] playerRoll = new int[thePlayers.size()]; for(int k = 0; k <thePlayers.size(); k++) { playerRoll[k] = theDice.roll(); while(isTie(k, playerRoll ) { playerRoll[k] = theDice.roll(); } }.......................private boolean isTie(int playerIndex, int playersRoll) { for(int i=0; i < players.size(); i++) { if(i != playerIndex && playersRoll[i] == playersRoll[playerIndex]) return true; } return false;}