|
|||||||||
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 meant for 3rd party applications to let them run
battles in Robocode and receive the results. This class in the main class
of the robocode.control
package.
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. |
void |
finalize()
|
RobotSpecification[] |
getLocalRepository()
Returns the robots available for for battle from the local robot repository in the Robocode home folder. |
String |
getVersion()
Returns the installed version of Robocode. |
void |
runBattle(BattleSpecification battle)
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 |
---|
public 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 battle)
battle
- 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 |