[Home]History of BenHorner/AnsweredQuestions

Robo Home | Changes | Preferences | AllPages


Revision 16 . . October 7, 2007 6:21 EST by BenHorner [onScannedRobot in melee]
Revision 15 . . September 22, 2007 23:37 EST by AaronR [The difference]
  

Difference (from prior major revision) (no other diffs)

Added: 1a2,13

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




Robo Home | Changes | Preferences | AllPages
Search: