public virtual Instruction run() { Instruction instruction = null; if (isAlive()) { instruction = tick(); mutation.errorLimitAction(this); mutation.randomMutation(this); } return(instruction); }
public void run() { tick(); int min = 4 < bonusEnergy ? 4 : bonusEnergy; for (int i = 0; i < min; i++) { if (isAlive()) { tick(); bonusEnergy--; } } /* * for (int i = 0; i < 1 + bonusEnergy; i++) { if (!isAlive()) { return; * } tick(); } bonusEnergy = 0; */ if (isAlive()) { mutation.errorLimitAction(this); mutation.randomMutation(this); } }