Hey, just like I made my first bot, just Spinbot (on full speed) with the gun of TrackFire. Success !! -- GrubbmGait

I was considering using trackfire's gun using LinearTargeting, and simularly using spinbot to creat a back and forth semicircle around the target:) I was reading your profile and noticed you did J2ME stuff. How hard do you think It would be to port robocode to that platform? Probably wouldn't happen because of the RAM constraints, but until minidevices get more advance it would be cool to dream about:D --dosnlinux

How to you fire while moving? Is there a way to do it using already availiable threads? --dosnlinux

Not only the RAM constraints, but also the graphical possibilities are (very) limited. Frankly, the only thing I have done with Java since that course is Robocode. Check my code, and you'll see what I mean (still writing C with a Java-coating). As for firing while moving, you need to extend AdvancedRobot. Very simplified it would show something like this:

Ofcourse there is a lot missing here, but I hope you get the general idea. In the beginning the easiest way (in OneOnOne) to control your gun and (partly) your movement is from the onScannedRobot eventhandler. Further check out Robohome -> Beginners -> Tutorial -> Snippetbot. It has been a start for a lot of (top)Robocoders. -- GrubbmGait

Let's see if I understand what is going on in the code(I'm still new to Java and programming, so if I misunderstand please correct me:) )

Okay, I misread the API. I thought the setTurnXradians? meathods weren't called until execute was, instead of "executes immediatly" Is the only reason the execute meathod is there is so that you can continue saving data? What other things would you be doing after you die that you would need to execute()? --dosnlinux

Your original understanding sounds correct. execute() makes everything happen that you called a setXXX method for, and also does any movement of the rest of the battle field - bots, bullets, etc., advancing to the next turn. In all of those updates, you could die (which could also happen during any blocking call). If you die, a DeathException? is thrown, which immediately exits the function and every other function you're in (including run) until the method that called run to begin with, at which point your bot stops executing. You never are supposed to get a chance to call execute after you die, continue saving data or continue getting events. The main thing you have to understand is when you die, your run method abruptly stops. -- Kawigi