/**
* Ask a player to pick trump.
*/
private void conductTrumpDiscovery() throws IOException,
InterruptedException {
AskTrumpRules atm_game = (AskTrumpRules) m_game;
String response;
do {
int who = atm_game.whoPicksTrump();
delatch(incomingResponses, who);
synchronized (coms[who]) {
coms[who].clearResend();
coms[who].respond("Please choose the trump.");
}
synchronized (this) {
while (incomingResponses[who] == null) {
synchronized (coms[who]) {
coms[who].resendOnly();
coms[who].respond("Please choose the trump.");
}
wait(1000);
}
response = (String) delatch(incomingResponses, who);
}
} while (!atm_game.trumpResponse(response));
broadcaster.setTrump(m_game.getTrump(), m_game.getTrumpName());
}