title: Robocode how to get the enemies co-ordinates
body: <p>I've been trying to get an enemy's coordinates so I can act on where they are. The code I use does not seem to work: </p>
  
  <pre><code>    double absBearing = e.getBearingRadians() + e.getHeadingRadians();
      double ex = getX() + e.getDistance() * Math.sin(absBearing);
      double ey = getY() + e.getDistance() * Math.cos(absBearing);
  </code></pre>
  
  <p>I seem to be getting odd returns that are giving me values greater than the size of the field and even minus numbers, has anyone any idea on how to ammend this piece of code to get the enemy's <code>X</code> and <code>Y</code> in the same way my <code>X</code> and <code>Y</code> is returned?</p>