}
// If we are stopping, yet the robot took action (in onWin or onDeath), stop now.
if (battle.isAborted()) {
isExecFinishedAndDisabled = true;
throw new AbortedException();
}
if (isDead()) {
isExecFinishedAndDisabled = true;
throw new DeathException();
}
if (isHalt()) {
isExecFinishedAndDisabled = true;
if (isWinner) {
throw new WinException();
} else {
throw new AbortedException();
}
}
waitForNextTurn();