RobocodeEngine MembersRobocode Control API for .NET

The RobocodeEngine type exposes the following members.
Constructors

  NameDescription
Public methodRobocodeEngine 
Creates a new RobocodeEngine for controlling Robocode. In order for this constructor to work, the current working directory must be the home directory directory of Robocode, e.g. C:\Robocode
Public methodRobocodeEngine(String)
Creates a new RobocodeEngine for controlling Robocode, where the home directory of Robocode is specified.
Back to Top
Methods

  NameDescription
Public methodAbortCurrentBattle
Aborts the current battle if it is running.
Public methodClose
Closes the RobocodeEngine and releases any allocated resources it holds. You should call this when you have finished using the RobocodeEngine. This method automatically disposes the Robocode window if it open.
Protected methodFinalize (Overrides OnlineObject Finalize .)
Public methodGetLocalRepository 
Returns all robots available from the local robot repository of Robocode. These robots must exists in the \robocode\robots directory, and must be compiled in advance, before these robot are returned with this method.
Public methodGetLocalRepository(String)
Returns a selection of robots available from the local robot repository of Robocode. These robots must exists in the \robocode\robots directory, and must be compiled in advance, before these robot are returned with this method.

Notice: If a specified robot cannot be found in the repository, it will not be returned in the array of robots returned by this method.
Public methodStatic memberPrintRunningThreads
Prints out all running threads to standard system out.
Public methodRunBattle(BattleSpecification)
Runs the specified battle.
Public methodRunBattle(BattleSpecification, Boolean)
Runs the specified battle.
Public methodRunBattle(BattleSpecification, String, Boolean)
Runs the specified battle.
Public methodWaitTillBattleOver
Will block caller until current battle is over.
Back to Top
Properties

  NameDescription
Public propertyStatic memberCurrentWorkingDir
Returns the current working directory for Robocode.
Public propertyStatic memberLogErrorsEnabled
Enables or disables errors logged to Console.Error.
Public propertyStatic memberLogMessagesEnabled
Enables or disables messages and warnings logged to Console.Out.
Public propertyStatic memberRobotsDir
Returns the directory containing the robots.
Public propertyVersion
Contains the installed version of Robocode controlled by this RobocodeEngine.
Public propertyVisible
Contains the visible state of the Robocode window.
Back to Top
Events

  NameDescription
Public eventBattleCompleted
Occurs when the battle is completed successfully and results are available.
Public eventBattleError
Occurs when an error message from the battle is sent from the game.
Public eventBattleFinished
Occurs when the battle is finished, where the battle can be either completed or aborted.
Public eventBattleMessage
Occurs when a message from the battle is sent from the game.
Public eventBattlePaused
Occurs when the battle is paused.
Public eventBattleResumed
Occurs when the battle is resumed after having been paused.
Public eventBattleStarted
Occurs when a new battle is started.
Public eventRoundEnded
Occurs when a round has ended.
Public eventRoundStarted
Occurs when a new round is started.
Public eventTurnEnded
Occurs when a new turn is ended.
Public eventTurnStarted
Occurs when a new turn is started.
Back to Top
See Also