This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help me in robocode java wave surfing

 
jhumar regaspi
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the code:



This is the error:

1. WARNING in C:\robocode\robots\Robot\Noblesse.java (at line 32)
_enemyWaves = new ArrayList();
^^^^^^^^^
ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized
----------
2. WARNING in C:\robocode\robots\Robot\Noblesse.java (at line 33)
_surfDirections = new ArrayList();
^^^^^^^^^
ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized
----------
3. WARNING in C:\robocode\robots\Robot\Noblesse.java (at line 34)
_surfAbsBearings = new ArrayList();
^^^^^^^^^
ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized
----------
4. ERROR in C:\robocode\robots\Robot\Noblesse.java (at line 40)
turnRadarRightRadians(Double.POSITIVE_INFINITY);
^^^^^^^^^^^^^^^^^^^^^
The method turnRadarRightRadians(double) is undefined for the type Noblesse
----------
4 problems (1 error, 3 warnings)
Compile Failed (-1)

can somebody help me.. I'm only a beginner hoping to become pro programmer..



 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12019
25
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message tells you exactly what is wrong.

4. ERROR in C:\robocode\robots\Robot\Noblesse.java (at line 40)
turnRadarRightRadians(Double.POSITIVE_INFINITY);
^^^^^^^^^^^^^^^^^^^^^
The method turnRadarRightRadians(double) is undefined for the type Noblesse

There is no method called "turnRadarRightRadians" that takes a double. There are two ways to fix it:

1) Don't call the (non-existent) method
2) Define the method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic