Difference between revisions of "AdvancedRobot"

From Robowiki
Jump to navigation Jump to search
m (Fixed grammar and added syntax highlighting)
 
Line 3: Line 3:
 
----
 
----
  
If you want to make an advancedRobot,  
+
In order to convert a Robot into an AdvancedRobot, replace:
You will need to change only one line in the source code.
 
  
So just replace
+
<syntaxhighlight lang="java">
<code>public class nameofyourrobot extends Robot</code>
+
public class NameOfRobot extends Robot { //...
 +
</syntaxhighlight>
  
By :  
+
with:
<code>public class nameofyourrobot extends AdvancedRobot</code>
 
  
After that, you will access to a lot of new event and more functions like turnRadarRightRadians.
+
<syntaxhighlight lang="java">
 +
public class NameOfRobot extends AdvancedRobot { //...
 +
</syntaxhighlight>
  
See more at Robocode API : [http://robocode.sourceforge.net/docs/robocode/robocode/AdvancedRobot.html]
+
This will allow you to access setXXX() methods, as well as other parts of Robocode.
  
 +
Learn more at the [http://robocode.sourceforge.net/docs/robocode/robocode/AdvancedRobot.html AdvancedRobot documentation].
  
 
[[Category:Robocode API]]
 
[[Category:Robocode API]]

Latest revision as of 02:27, 26 March 2016

This page is dedicated for describing the robocode.AdvancedRobot


In order to convert a Robot into an AdvancedRobot, replace:

public class NameOfRobot extends Robot { //...

with:

public class NameOfRobot extends AdvancedRobot { //...

This will allow you to access setXXX() methods, as well as other parts of Robocode.

Learn more at the AdvancedRobot documentation.