private synchronized List<Move> sendPlayRequests() throws InterruptedException, MoveDefinitionException {
List<PlayRequestThread> threads = new ArrayList<PlayRequestThread>(hosts.size());
for (int i = 0; i < hosts.size(); i++) {
List<Move> legalMoves = stateMachine.getLegalMoves(currentState, stateMachine.getRoles().get(i));
if (playerPlaysRandomly[i]) {
threads.add(new RandomPlayRequestThread(match, legalMoves));
} else {
threads.add(new PlayRequestThread(this, match, previousMoves, legalMoves, stateMachine.getRoles().get(i), hosts.get(i), ports.get(i), getPlayerNameFromMatchForRequest(i), playerGetsUnlimitedTime[i]));
}
}
for (PlayRequestThread thread : threads) {