« Return to Thread: update the download jar?

Re: update the download jar?

by gypsy_fly :: Rate this Message:

Reply to Author | View in Thread

The labs have a new image here are Portland State University.  It presents all the programs I use in class in one folder.  Bottom line is that students in my Lego Robotics class got into robocode.  Unfortunately, my "core" dumped robocode after a term on "non-use".  So it's going to take me a while to reload robocode and familiarize myself with it.  Anyway...

We got into this normalRelativeAngle compile error again.

The robot is Tracker and the error is "No accessible method"

I tried combinations of the following:

   1. Util.normalRelativeAngleDegrees()
   2. Util.normalRelativeAngle()
   3. import static robocode.util.Util.normalRelativeAngle
   4. import static robocode.util.Util
   5. import without the static

Then I ran out of time.

The kids were also getting errors relating to BulletHitBullet in MyFirstRobot, which does not use BulletHitBullet.  I'll have to look that up later.

Anyway, if someone more knowledgeable can please help a harried teacher to fix the bugs, please accept my sincerest gratitude.

Best,
Edwin

--- In Robocode@..., "flemmingnlarsen" <flemming.n.larsen@...> wrote:

>
> Hi,
>
> Originally the normalRelativeAngle() method (and similar methods) was
> available in the internal Robocode class robocode.util.Utils. The
> robots were not supposed to use these internal methods. But since a
> lot of old robots count of the Utils class, it has been preserved for
> backwards compability with old robots.
>
> So, the normalRelativeAngle() is not available on the Robot and
> AdvancedRobot class etc. you have to 'import robocode.util.Utils', and
> write Utils.normalRelativeAngle() in order to access it.
>
> With Java 5 you can do this "smarter" by performing a static import
> like 'import static robocode.util.Utils.*'. This way you can call
> 'normalRelativeAngle()' instead of writing 'Utils.' as "prefix".
>
> Regards,
> - Flemming
>
> --- In Robocode@..., "Edwin Pilobello" <e_pilobello@>
> wrote:
> >
> > One of my students downloaded robocode and compiled TrackFire.  It
> > seems normalRelativeAngle is now a separate util.  Seems the utils were
> > not included in the dow2bnload.
> >
>


 « Return to Thread: update the download jar?