Re: Re: Need HawkonFire Code
"Julian Kent" <[email protected]>
| Newsgroups | gmane.comp.java.robocode |
|---|---|
| Message-ID | <[email protected]> |
This adds (bad) weight to any points that are inline with the current line from here to enemy bots. This prevents the bot not only from moving to places where bots are (the antigrav), but also prevents moving directly towards them. Julian On Sun, 12 Jun 2011 14:09 +0000, "funkyf1sh" <[email protected]> wrote: > Thank You. Now I get the code of HawkOnFire but I dont understand what > "(1 + Math.abs(Math.cos(calcAngle(myPos, p) - calcAngle(en.pos, p)))) "/ > p.distanceSq(en.pos) does. I tried to draw the lines with the onPaint > function. But still dont get it. > calcAngle only calculates the arctan2 of 2 points. > p.distanceSq(en.pos) is the antigrav like calculation. My problem is the > numerator. > > Does it calculate the destinationpoint with the smallest angle? > > Hope someone can help me. Thanks > > > > ------------------------------------ > > Yahoo! Groups Links > > > > -- Julian Kent [email protected] -- http://www.fastmail.fm - Faster than the air-speed velocity of an unladen european swallow ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Robocode/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/Robocode/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/