|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode.control.RobocodeEngine
public class RobocodeEngine
The RobocodeEngine is the old interface provided for external applications in order to let these applications run battles within the Robocode application, and to get the results from these battles.
This class in the main class of therobocode.control
package, and the
reason for having this control package.
The RobocodeEngine is used by RoboRumble@Home, which is integrated in
Robocode, but also RoboLeague and RobocodeJGAP. In addition, the
RobocodeEngine is also used by the test units for testing the Robocode
application itself.
Constructor Summary | |
---|---|
RobocodeEngine(File robocodeHome,
RobocodeListener listener)
Creates a new RobocodeEngine for controlling Robocode. |
|
RobocodeEngine(RobocodeListener listener)
Creates a new RobocodeEngine for controlling Robocode. |
Method Summary | |
---|---|
void |
abortCurrentBattle()
Aborts the current battle if it is running. |
void |
close()
Closes the RobocodeEngine and releases any allocated resources. |
protected void |
finalize()
|
RobotSpecification[] |
getLocalRepository()
Returns all robots available from the local robot repository of Robocode. |
String |
getVersion()
Returns the installed version of Robocode. |
void |
runBattle(BattleSpecification battleSpecification)
Runs the specified battle. |
void |
setVisible(boolean visible)
Shows or hides the Robocode window. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RobocodeEngine(File robocodeHome, RobocodeListener listener)
robocodeHome
- the root directory of Robocode, e.g. C:\Robocode.listener
- the listener that must receive the callbacks from this
RobocodeEngine.RobocodeEngine(RobocodeListener)
,
close()
public RobocodeEngine(RobocodeListener listener)
RobocodeEngine(File, RobocodeListener)
.
listener
- the listener that must receive the callbacks from this
RobocodeEngine.RobocodeEngine(File, RobocodeListener)
,
close()
Method Detail |
---|
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void close()
public String getVersion()
public void setVisible(boolean visible)
visible
- true
if the Robocode window must be set visible;
false
otherwise.public RobotSpecification[] getLocalRepository()
RobotSpecification
public void runBattle(BattleSpecification battleSpecification)
battleSpecification
- the specification of the battle to play including the
participation robots.RobocodeListener.battleComplete(BattleSpecification, RobotResults[])
,
RobocodeListener.battleMessage(String)
,
BattleSpecification
,
getLocalRepository()
public void abortCurrentBattle()
runBattle(BattleSpecification)
,
RobocodeListener.battleAborted(BattleSpecification)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |