Some stylistic fixes for code review

This commit is contained in:
Devon Richards 2017-06-21 23:51:59 -05:00
parent f0b8fd8eec
commit 63382aed93

View file

@ -125,7 +125,9 @@ public class HumanPlayer extends PlayerImpl {
}
protected boolean isExecutingMacro() {
return !actionQueue.isEmpty() || (actionIterations > 0 && !actionQueueSaved.isEmpty());
return !recordingMacro
&& (!actionQueue.isEmpty()
|| (actionIterations > 0 && !actionQueueSaved.isEmpty()));
}
protected boolean pullResponseFromQueue(Game game) {
@ -152,7 +154,10 @@ public class HumanPlayer extends PlayerImpl {
}
protected void waitForResponse(Game game) {
if(!recordingMacro && pullResponseFromQueue(game)) return;
if (isExecutingMacro()) {
pullResponseFromQueue(game);
return;
}
response.clear();
logger.debug("Waiting response from player: " + getId());
game.resumeTimer(getTurnControlledBy());