Rules MembersRobocode Robot API for .NET

The Rules type exposes the following members.
Methods

  NameDescription
Public methodStatic memberGetBulletDamage
Returns the amount of damage of a bullet given a specific bullet power.
Public methodStatic memberGetBulletHitBonus
Returns the amount of bonus given when a robot's bullet hits an opponent robot given a specific bullet power.
Public methodStatic memberGetBulletSpeed
Returns the speed of a bullet given a specific bullet power measured in pixels/turn.
Public methodStatic memberGetGunHeat
Returns the heat produced by firing the gun given a specific bullet power.
Public methodStatic memberGetTurnRate
Returns the turn rate of a robot given a specific velocity measured in degrees/turn.
Public methodStatic memberGetTurnRateRadians
Returns the turn rate of a robot given a specific velocity measured in radians/turn.
Public methodStatic memberGetWallHitDamage
Returns the amount of damage taken when robot hits a wall with a specific velocity.
Back to Top
Fields

  NameDescription
Public fieldStatic memberACCELERATION
The acceleration of a robot, i.e. the increase of velocity when the robot moves forward, which is 1 pixel/turn.
Public fieldStatic memberDECELERATION
The deceleration of a robot, i.e. the decrease of velocity when the robot moves backwards (or brakes), which is 2 pixels/turn.
Public fieldStatic memberGUN_TURN_RATE
The turning rate of the gun measured in degrees, which is 20 degrees/turn. Note, that if AdjustGunForRobotTurn = true has been set, the gun turn is independent of the robot turn. In this case the gun moves relatively to the screen.

If AdjustGunForRobotTurn = false has been set or AdjustGunForRobotTurn has not been called at all (this is the default), then the gun turn is dependent on the robot turn, and in this case the gun moves relatively to the robot body.
Public fieldStatic memberGUN_TURN_RATE_RADIANS
The turning rate of the gun measured in radians instead of degrees.
Public fieldStatic memberMAX_BULLET_POWER
The maximum bullet power, i.e. the maximum amount of energy that can be transferred to a bullet when it is fired, which is 3 energy points.
Public fieldStatic memberMAX_TURN_RATE
The maximum turning rate of the robot, in degrees, which is 10 degress/turn. Note, that the turn rate of the robot depends on it's velocity.
Public fieldStatic memberMAX_TURN_RATE_RADIANS
The maximum turning rate of the robot measured in radians instead of degrees.
Public fieldStatic memberMAX_VELOCITY
The maximum velocity of a robot, which is 8 pixels/turn.
Public fieldStatic memberMIN_BULLET_POWER
The minimum bullet power, i.e the amount of energy required for firing a bullet, which is 0.1 energy points.
Public fieldStatic memberRADAR_SCAN_RADIUS
The radar scan radius, which is 1200 pixels. Robots which is more than 1200 pixels away cannot be seen on the radar.
Public fieldStatic memberRADAR_TURN_RATE
The turning rate of the radar measured in degrees, which is 45 degrees/turn. Note, that if AdjustRadarForRobotTurn = true and/or AdjustRadarForGunTurn = true has been set, the radar turn is independent of the robot and/or gun turn. If both properties hava been set to true, the radar moves relatively to the screen.

If AdjustRadarForRobotTurn = false and/or AdjustRadarForGunTurn = false have been set or not set at all (this is the default), then the radar turn is dependent on the robot and/or gun turn, and in this case the radar moves relatively to the gun and/or robot body.
Public fieldStatic memberRADAR_TURN_RATE_RADIANS
The turning rate of the radar measured in radians instead of degrees.
Public fieldStatic memberROBOT_HIT_BONUS
The amount of bonus given when a robot moving forward hits an opponent robot (ramming), which is 1.2 energy points.
Public fieldStatic memberROBOT_HIT_DAMAGE
The amount of damage taken when a robot hits or is hit by another robot, which is 0.6 energy points.
Back to Top
See Also