I've been trying to use the method getBattlefieldWidth() and the method getBattlefieldHeight(). However, when I use either my code refuses to compile. I get an error that looks like this:
C:\robocode\robots\DE\Cypress.java:32: error: cannot find symbol
getBattlefieldWidth();
^
symbol: method getBattlefieldWidth()
location: class Cypress
This is especially confusing as I can succesfully compile when using other methods from BattleRules, like getGunCoolingRate() and getNumRounds().
Any thoughts appreciated.
EDIT:
Some more details on my system:
-I'm using Robocode 1.9.3.7 on Windows 10 with an up-to-date version of Java
-I'm compiling using this command:
javac -classpath libs\robocode.jar C:\robocode\robots\DE\Cypress.java
I get the same behaviour when setting up the compiler from inside the Robocode editor with the following classpath options:
-classpath "C:\Program Files\Java\jre1.8.0_201/lib/rt.jar";libs\robocode.jar
Last edit: millsmess 2020-02-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I've been trying to use the method getBattlefieldWidth() and the method getBattlefieldHeight(). However, when I use either my code refuses to compile. I get an error that looks like this:
C:\robocode\robots\DE\Cypress.java:32: error: cannot find symbol
getBattlefieldWidth();
^
symbol: method getBattlefieldWidth()
location: class Cypress
This is especially confusing as I can succesfully compile when using other methods from BattleRules, like getGunCoolingRate() and getNumRounds().
Any thoughts appreciated.
EDIT:
Some more details on my system:
-I'm using Robocode 1.9.3.7 on Windows 10 with an up-to-date version of Java
-I'm compiling using this command:
javac -classpath libs\robocode.jar C:\robocode\robots\DE\Cypress.java
I get the same behaviour when setting up the compiler from inside the Robocode editor with the following classpath options:
-classpath "C:\Program Files\Java\jre1.8.0_201/lib/rt.jar";libs\robocode.jar
Last edit: millsmess 2020-02-14
Sorry for the late answer.
The name of the method you are looking for is speeled with a big letter F:
getBattleFieldWidth()
Sorry for the confusion.