Class BotState
Represents the current bot state.
Inherited Members
Namespace: Robocode.TankRoyale.BotApi
Assembly: api.dll
Syntax
[PublicAPI]
public sealed class BotState
Constructors
| Edit this page View SourceBotState(bool, double, double, double, double, double, double, double, double, double, double, double, double, int, Color?, Color?, Color?, Color?, Color?, Color?, Color?, bool)
Initializes a new instance of the BotState class.
Declaration
[JsonConstructor]
public BotState(bool isDroid, double energy, double x, double y, double direction, double gunDirection, double radarDirection, double radarSweep, double speed, double turnRate, double gunTurnRate, double radarTurnRate, double gunHeat, int enemyCount, Color? bodyColor, Color? turretColor, Color? radarColor, Color? bulletColor, Color? scanColor, Color? tracksColor, Color? gunColor, bool isDebuggingEnabled)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isDroid | Flag specifying if the bot is a droid. |
| double | energy | Energy level. |
| double | x | X coordinate. |
| double | y | Y coordinate. |
| double | direction | Driving direction in degrees. |
| double | gunDirection | Gun direction in degrees. |
| double | radarDirection | Radar direction in degrees. |
| double | radarSweep | Radar sweep angle in degrees. |
| double | speed | Speed measured in pixels per turn. |
| double | turnRate | Turn rate of the body in degrees per turn. |
| double | gunTurnRate | Turn rate of the gun in degrees per turn. |
| double | radarTurnRate | Turn rate of the radar in degrees per turn. |
| double | gunHeat | Gun heat. |
| int | enemyCount | Number of enemies left. |
| Color? | bodyColor | Body color. |
| Color? | turretColor | Gun turret color. |
| Color? | radarColor | Radar color. |
| Color? | bulletColor | Bullet color. |
| Color? | scanColor | Scan arc color. |
| Color? | tracksColor | Tracks color. |
| Color? | gunColor | Gun color. |
| bool | isDebuggingEnabled | Flag specifying if graphical debugging is enabled. |
Properties
| Edit this page View SourceBodyColor
Body color.
Declaration
public Color? BodyColor { get; }
Property Value
| Type | Description |
|---|---|
| Color? | The body color. |
BulletColor
Bullet color.
Declaration
public Color? BulletColor { get; }
Property Value
| Type | Description |
|---|---|
| Color? | The bullet color. |
Direction
Driving direction in degrees.
Declaration
public double Direction { get; }
Property Value
| Type | Description |
|---|---|
| double | The driving direction in degrees. |
EnemyCount
Number of enemy bots left in the current round.
Declaration
public int EnemyCount { get; }
Property Value
| Type | Description |
|---|---|
| int | The enemy count. |
Energy
Energy level.
Declaration
public double Energy { get; }
Property Value
| Type | Description |
|---|---|
| double | The energy level. |
GunColor
Gun color.
Declaration
public Color? GunColor { get; }
Property Value
| Type | Description |
|---|---|
| Color? | The gun color. |
GunDirection
Gun direction in degrees.
Declaration
public double GunDirection { get; }
Property Value
| Type | Description |
|---|---|
| double | The gun direction in degrees. |
GunHeat
Gun heat.
Declaration
public double GunHeat { get; }
Property Value
| Type | Description |
|---|---|
| double | The gun heat. |
GunTurnRate
Turn rate of the gun in degrees per turn (can be positive and negative).
Declaration
public double GunTurnRate { get; }
Property Value
| Type | Description |
|---|---|
| double | The turn rate of the gun in degrees per turn (can be positive and negative). |
IsDebuggingEnabled
Flag indicating if graphical debugging is enabled.
Declaration
public bool IsDebuggingEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
|
RadarColor
Radar color.
Declaration
public Color? RadarColor { get; }
Property Value
| Type | Description |
|---|---|
| Color? | The radar color. |
RadarDirection
Radar direction in degrees.
Declaration
public double RadarDirection { get; }
Property Value
| Type | Description |
|---|---|
| double | The radar direction in degrees. |
RadarSweep
Radar sweep angle in degrees.
Declaration
public double RadarSweep { get; }
Property Value
| Type | Description |
|---|---|
| double | The radar sweep angle in degrees. |
RadarTurnRate
Turn rate of the radar in degrees per turn (can be positive and negative).
Declaration
public double RadarTurnRate { get; }
Property Value
| Type | Description |
|---|---|
| double | The turn rate of the radar in degrees per turn (can be positive and negative). |
ScanColor
Scan arc color.
Declaration
public Color? ScanColor { get; }
Property Value
| Type | Description |
|---|---|
| Color? | The scan arc color. |
Speed
Speed measured in pixels per turn.
Declaration
public double Speed { get; }
Property Value
| Type | Description |
|---|---|
| double | The speed measured in pixels per turn. |
TracksColor
Tracks color.
Declaration
public Color? TracksColor { get; }
Property Value
| Type | Description |
|---|---|
| Color? | The tracks color. |
TurnRate
Turn rate of the body in degrees per turn (can be positive and negative).
Declaration
public double TurnRate { get; }
Property Value
| Type | Description |
|---|---|
| double | The turn rate of the body in degrees per turn (can be positive and negative). |
TurretColor
Gun turret color.
Declaration
public Color? TurretColor { get; }
Property Value
| Type | Description |
|---|---|
| Color? | The gun turret color. |
X
X coordinate.
Declaration
public double X { get; }
Property Value
| Type | Description |
|---|---|
| double | The X coordinate. |
Y
Y coordinate.
Declaration
public double Y { get; }
Property Value
| Type | Description |
|---|---|
| double | The Y coordinate. |