ReadonlyMAX_The maximum number of team messages that can be sent per turn.
ReadonlyTEAM_The maximum size of a team message in bytes (32 KB).
Adds a custom condition that triggers a CustomEvent when met. Returns true if added.
Moves the bot backward by the given distance (blocking). Blocks until the movement is completed.
the distance to move backward in units.
Calculates the bearing from the bot's direction to the given coordinates.
the X coordinate.
the Y coordinate.
the bearing in degrees in the range [-180, 180].
Broadcasts a message to all teammates.
Calculates the bearing (angle) from the bot's direction to the given direction.
the direction to calculate the bearing to.
the bearing in degrees in the range [-180, 180].
Calculates the bullet speed for a given firepower.
Calculates the delta angle between a target angle and a source angle.
the target angle.
the source angle.
the delta angle in degrees in the range [-180, 180].
Calculates the bearing from the gun's direction to the given direction.
the direction to calculate the bearing to.
the bearing in degrees in the range [-180, 180].
Calculates the gun heat for a given firepower.
Calculates the maximum turn rate for a given speed.
Calculates the bearing from the radar's direction to the given direction.
the direction to calculate the bearing to.
the bearing in degrees in the range [-180, 180].
Clears the events for the current turn.
Calculates the direction from the bot to the given coordinates.
the X coordinate.
the Y coordinate.
the direction in degrees in the range [0, 360).
Calculates the distance from the bot to the given coordinates.
the X coordinate.
the Y coordinate.
the distance in units.
Fires the gun with the given firepower (blocking). Blocks until the next turn after firing.
the firepower to fire with.
Moves the bot forward by the given distance (blocking). Blocks until the movement is completed.
the distance to move forward in units.
Height of the arena measured in units. First available when the game has started.
Width of the arena measured in units. First available when the game has started.
The body color of the bot.
The bullet color of the bot.
The current bullet states.
The driving direction of the bot in degrees.
The distance remaining until the bot has finished moving.
The number of enemy bots left in the round.
The energy level of the bot.
Gets the event priority for a given event type name.
The events that occurred in the current turn.
The firepower of the last setFire() call.
Game type, e.g. "melee" or "1v1". First available when the game has started.
Returns the graphics object for drawing on the canvas.
The gun color of the bot.
Gun cooling rate. First available when the game has started.
The gun direction of the bot in degrees.
The gun heat of the bot. The gun cannot fire when the gun heat is > 0.
The current gun turn rate in degrees per turn.
The gun turn remaining until the gun has finished turning.
The maximum gun turn rate in degrees per turn.
The maximum number of inactive turns allowed before the bot is zapped.
The maximum radar turn rate in degrees per turn.
The maximum speed in units per turn.
The maximum turn rate of the bot in degrees per turn.
Unique id of this bot, available when the game has started.
The number of rounds in a battle. First available when the game has started.
The radar color of the bot.
The radar direction of the bot in degrees.
The current radar turn rate in degrees per turn.
The radar turn remaining until the radar has finished turning.
The current round number.
The scan arc color of the bot.
The speed of the bot measured in units per turn.
The target speed in units per turn.
Returns the set of teammate bot IDs.
The number of microseconds left of this turn before the bot will skip the turn.
The tracks color of the bot.
The current turn number.
The current turn rate of the bot in degrees per turn.
The turn remaining until the bot has finished turning.
The turn timeout in microseconds. First available when the game has started.
The turret color of the bot.
The game variant, which is "Tank Royale".
Game version, e.g. "1.0.0".
The X coordinate of the bot.
The Y coordinate of the bot.
Commits the current commands (actions), finalizing the current turn for the bot. Must be called once per turn before the turn timeout occurs.
Calculates the bearing from the gun's direction to the given coordinates.
the X coordinate.
the Y coordinate.
the bearing in degrees in the range [-180, 180].
Returns whether the gun is set to adjust for the body turn.
Returns whether the radar is set to adjust for the body turn.
Returns whether the radar is set to adjust for the gun turn.
Returns whether debugging is enabled.
Whether the bot is disabled, i.e. has no energy.
Returns whether the bot is currently running.
Returns whether the bot is stopped.
Returns whether the given bot ID is a teammate.
Normalizes an angle to an absolute angle in the range [0, 360).
the angle to normalize.
the normalized angle.
Normalizes an angle to a relative angle in the range [-180, 180].
the angle to normalize.
the normalized angle.
Calculates the bearing from the radar's direction to the given coordinates.
the X coordinate.
the Y coordinate.
the bearing in degrees in the range [-180, 180].
Rescans with the radar (blocking). Blocks until the next turn.
Resumes movement after a stop (blocking). Blocks until the next turn.
The main method for the bot. Override this to implement the bot's behavior. This method is called when the bot starts running in a new round.
Sends a message to a specific teammate.
Sets whether the gun should adjust for the body turn.
Sets whether the radar should adjust for the body turn.
Sets whether the radar should adjust for the gun turn.
Sets the bot to move backward by the given distance (non-blocking).
the distance to move backward in units.
Sets the event priority for a given event type name.
Sets the gun to fire with the given firepower. Returns true if the gun will fire, false if not. The gun will not fire if the gun is still hot, or the firepower is out of range.
Enables or disables fire assistance.
Sets the bot to move forward by the given distance (non-blocking).
the distance to move forward in units.
Sets the gun turn rate in degrees per turn.
Sets whether the current event handler is interruptible.
Sets the maximum gun turn rate in degrees per turn.
Sets the maximum radar turn rate in degrees per turn.
Sets the maximum speed in units per turn.
Sets the maximum turn rate of the bot in degrees per turn.
Sets the radar turn rate in degrees per turn.
Sets the bot to rescan with the radar.
Sets the bot to resume movement after a stop.
Sets the bot to stop all movement.
Sets the bot to stop all movement, optionally overwriting a previous stop.
Sets the target speed in units per turn.
Sets the gun to turn left by the given degrees (non-blocking).
the degrees to turn the gun left.
Sets the gun to turn right by the given degrees (non-blocking).
the degrees to turn the gun right.
Sets the bot to turn left by the given degrees (non-blocking).
the degrees to turn left.
Sets the radar to turn left by the given degrees (non-blocking).
the degrees to turn the radar left.
Sets the radar to turn right by the given degrees (non-blocking).
the degrees to turn the radar right.
Sets the turn rate of the bot in degrees per turn.
Sets the bot to turn right by the given degrees (non-blocking).
the degrees to turn right.
Starts the bot, connecting to the server and running until the game ends.
Stops all movement (blocking). Blocks until the next turn.
Stops all movement (blocking), optionally overwriting a previous stop. Blocks until the next turn.
whether to overwrite a previous stop.
Turns the gun left by the given degrees (blocking). Blocks until the turn is completed.
the degrees to turn the gun left.
Turns the gun right by the given degrees (blocking). Blocks until the turn is completed.
the degrees to turn the gun right.
Turns the bot left by the given degrees (blocking). Blocks until the turn is completed.
the degrees to turn left.
Turns the radar left by the given degrees (blocking). Blocks until the turn is completed.
the degrees to turn the radar left.
Turns the radar right by the given degrees (blocking). Blocks until the turn is completed.
the degrees to turn the radar right.
Turns the bot right by the given degrees (blocking). Blocks until the turn is completed.
the degrees to turn right.
Waits until the given condition is true, calling go() each turn.
the condition to wait for.
Interface for a bot that extends IBaseBot with blocking movement methods.
This interface adds the ability to execute blocking movement commands that wait until the movement is completed before returning.