A Few Suggestions

Jump to navigation Jump to search
Revision as of 28 April 2013 at 01:15.
This is the thread's initial revision.

A Few Suggestions

I was looking through the code of version 1.2, and I noticed some things you might want to fix in the next version. Here they are:

  • I don't think the code in onBulletHit is doing what you think it's doing.
  • The while loop in the radar code is unnecessary. Also, Double.POSITIVE_INFINITY is a byte cheaper than 1 / 0.
  • Infinity Radar is sloppy enough even with setAdjustRadarForGunTurn. If I were you, I would get rid of that and replace it with setAdjustGunForRobotTurn.
  • Finally, you can assign a new value to d0 inline in your aiming code to save a byte.
    Sheldor02:15, 28 April 2013