## robocode.control
Class RobocodeEngine

    java.lang.Object
      robocode.control.RobocodeEngine

    public class RobocodeEngine

extends java.lang.Object

RobocodeEngine - Class for controlling Robocode.

Author:
  Mathew A. Nelson (original), Flemming N. Larsen (contributor), Robert D. Maupin (contributor)
See Also:
  robocode.sourceforge.net

Constructor Summary
`RobocodeEngine(java.io.File robocodeHome, RobocodeListener listener)` Creates a new RobocodeEngine
`RobocodeEngine(RobocodeListener listener)` Creates a new RobocodeEngine using robocode.jar to determine the robocodeHome file.

Method Summary
`void` `abortCurrentBattle()` Asks a battle to abort.
`void` `close()` Call this when you are finished with this RobocodeEngine.
`RobotSpecification[]` `getLocalRepository()` Gets a list of robots available for battle.
`java.lang.String` `getVersion()` Returns the installed version of Robocode.
`void` `runBattle(BattleSpecification battle)` Runs a battle
`void` `setVisible(boolean visible)` Shows or hides the Robocode window.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RobocodeEngine

    public RobocodeEngine(java.io.File robocodeHome,
                          RobocodeListener listener)

  Creates a new RobocodeEngine

  Parameters:
    `robocodeHome` - should be the root robocode directory (i.e. c:\robocode)
    `listener` - Your listener

### RobocodeEngine

    public RobocodeEngine(RobocodeListener listener)

  Creates a new RobocodeEngine using robocode.jar to determine the robocodeHome file.

  Parameters:
    `listener` - Your listener

Method Detail

### close

    public void close()

  Call this when you are finished with this RobocodeEngine. This method disposes the Robocode window

### getVersion

    public java.lang.String getVersion()

  Returns the installed version of Robocode.

  Returns:
    the installed version of Robocode.

### setVisible

    public void setVisible(boolean visible)

  Shows or hides the Robocode window.

### getLocalRepository

    public RobotSpecification[] getLocalRepository()

  Gets a list of robots available for battle.

  Returns:
    An array of all available robots.

### runBattle

    public void runBattle(BattleSpecification battle)

  Runs a battle

### abortCurrentBattle

    public void abortCurrentBattle()

  Asks a battle to abort.