Will onRobotDeath event miss due to skipped turns?

Jump to navigation Jump to search
Revision as of 30 December 2017 at 02:50.
The highlighted comment was created in this revision.

Will onRobotDeath event miss due to skipped turns?

onRobotDeath is crucial when dealing with multiple enemies. If this event were able to lost, it will be hard to guess that information back.

    Xor (talk)16:47, 29 December 2017
    If I understood correctly skipped turns happen when the bots passes the time limit. I think, after this event no actions are made(setAhead( ), setFire( etc.) and no events are called after it. I am 99 percent sure that if you call onRobotDeath first no skipped turns will harm it.
    Even if it stopped everything you did by not updating the robot, static variables wouldn't change.
      Dsekercioglu (talk)18:17, 29 December 2017
       

      I think all events (except the skip turn event) are lost when robocode punishes for long CPU use. I have no source confirmation for it. But I quite sure that event of enemy death can be lost. I recall adding a special check of enemy not being scanned for something like 10 tics to put it into the dead enemy category because, because I was occasionally missing the death event during the run. I also think you might even miss your own death event. I have a code which suppose to print some stats at such event, and I see that sometimes the output is not produced.

        Beaming (talk)03:50, 30 December 2017