* This I actually remembered :) Go figure I do not get the easy thing but remeber the hard part :( -- jim |
* This I actually remembered :) Go figure I do not get the easy thing but remeber the hard part :( -- jim I was kind of using pseudocode, so yes, you need to sort out the radians, you need to use robocode.utils.Utils or whatever it is. Good luck. -- Tango |
To orbit you want turnRight(e.getBearing()+PI/2); to tell if you are facing the enemy you want abs(relativeAngle(e.getBearing()))<10, i think. That would return true if you are within 10 degrees (it will work just as well if you use radians) of facing the enemy. -- Tango
Tango is mixing up some radians and degrees there, but whatever. Don't forget to add PI to your heading if you are going backward. -- Kawigi
I was kind of using pseudocode, so yes, you need to sort out the radians, you need to use robocode.utils.Utils or whatever it is. Good luck. -- Tango