Example #1
0
        public virtual Instruction run()
        {
            Instruction instruction = null;

            if (isAlive())
            {
                instruction = tick();
                mutation.errorLimitAction(this);
                mutation.randomMutation(this);
            }
            return(instruction);
        }
Example #2
0
    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);
    }
}