• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please help me in robocode java wave surfing

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..



 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic