Is it possible that two event handlers are running simultaneously? I'm not 100% on how the threading stuff works... In an AdvancedRobot, you tell it the stuff to do, then call execute(), and your thread is blocked, but events still get kicked off right? So those events are running in a different thread than your run() method right? If so, does that mean that they could each be running in their own threads, and might be running at the same time? I'm particularly curious about onScannedRobot() in melee, when multiple robots might be scanned in a single turn, do I need to be careful about updating state? --BenHorner In melee, onScannedRobot will be called once per robot that you scanned, in order of distance from you. The closest robot will be the first call while the farthest will be the last call. --David Alves Ok, does the second call wait until the first is complete before it starts? If so, does that count against the amount of processing time your bot is allotted each turn? --BenHorner Yes and yes. --David Alves Thanks. --BenHorner |