C# Класс Robocode.Rules

Constants and methods that defines the rules of Robocode. Constants are used for rules that will not change. Methods are provided for rules that can be changed between battles or which depends on some other factor.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
ACCELERATION double
DECELERATION double
GUN_TURN_RATE double
GUN_TURN_RATE_RADIANS double
MAX_BULLET_POWER double
MAX_TURN_RATE double
MAX_TURN_RATE_RADIANS double
MAX_VELOCITY double
MIN_BULLET_POWER double
RADAR_SCAN_RADIUS double
RADAR_TURN_RATE double
RADAR_TURN_RATE_RADIANS double
ROBOT_HIT_BONUS double
ROBOT_HIT_DAMAGE double

Открытые методы

Метод Описание
GetBulletDamage ( double bulletPower ) : double

Returns the amount of damage of a bullet given a specific bullet power.

GetBulletHitBonus ( double bulletPower ) : double

Returns the amount of bonus given when a robot's bullet hits an opponent robot given a specific bullet power.

GetBulletSpeed ( double bulletPower ) : double

Returns the speed of a bullet given a specific bullet power measured in pixels/turn.

GetGunHeat ( double bulletPower ) : double

Returns the heat produced by firing the gun given a specific bullet power.

GetTurnRate ( double velocity ) : double

Returns the turn rate of a robot given a specific velocity measured in degrees/turn. GetTurnRateRadians(double)

GetTurnRateRadians ( double velocity ) : double

Returns the turn rate of a robot given a specific velocity measured in radians/turn. GetTurnRate(double)

GetWallHitDamage ( double velocity ) : double

Returns the amount of damage taken when robot hits a wall with a specific velocity.

Описание методов

GetBulletDamage() публичный статический Метод

Returns the amount of damage of a bullet given a specific bullet power.
public static GetBulletDamage ( double bulletPower ) : double
bulletPower double the energy power of the bullet.
Результат double

GetBulletHitBonus() публичный статический Метод

Returns the amount of bonus given when a robot's bullet hits an opponent robot given a specific bullet power.
public static GetBulletHitBonus ( double bulletPower ) : double
bulletPower double the energy power of the bullet
Результат double

GetBulletSpeed() публичный статический Метод

Returns the speed of a bullet given a specific bullet power measured in pixels/turn.
public static GetBulletSpeed ( double bulletPower ) : double
bulletPower double the energy power of the bullet.
Результат double

GetGunHeat() публичный статический Метод

Returns the heat produced by firing the gun given a specific bullet power.
public static GetGunHeat ( double bulletPower ) : double
bulletPower double the energy power of the bullet
Результат double

GetTurnRate() публичный статический Метод

Returns the turn rate of a robot given a specific velocity measured in degrees/turn. GetTurnRateRadians(double)
public static GetTurnRate ( double velocity ) : double
velocity double The velocity of the robot.
Результат double

GetTurnRateRadians() публичный статический Метод

Returns the turn rate of a robot given a specific velocity measured in radians/turn. GetTurnRate(double)
public static GetTurnRateRadians ( double velocity ) : double
velocity double the velocity of the robot.
Результат double

GetWallHitDamage() публичный статический Метод

Returns the amount of damage taken when robot hits a wall with a specific velocity.
public static GetWallHitDamage ( double velocity ) : double
velocity double the velocity of the robot.
Результат double

Описание свойств

ACCELERATION публичное статическое свойство

The acceleration of a robot, i.e. the increase of velocity when the robot moves forward, which is 1 pixel/turn.
public static double ACCELERATION
Результат double

DECELERATION публичное статическое свойство

The deceleration of a robot, i.e. the decrease of velocity when the robot moves backwards (or brakes), which is 2 pixels/turn.
public static double DECELERATION
Результат double

GUN_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. GUN_TURN_RATE_RADIANS Robot.IsAdjustGunForRobotTurn

public static double GUN_TURN_RATE
Результат double

GUN_TURN_RATE_RADIANS публичное статическое свойство

The turning rate of the gun measured in radians instead of degrees. GUN_TURN_RATE
public static double GUN_TURN_RATE_RADIANS
Результат double

MAX_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 static double MAX_BULLET_POWER
Результат double

MAX_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. MAX_TURN_RATE_RADIANS GetTurnRate(double) GetTurnRateRadians(double)
public static double MAX_TURN_RATE
Результат double

MAX_TURN_RATE_RADIANS публичное статическое свойство

The maximum turning rate of the robot measured in radians instead of degrees. MAX_TURN_RATE GetTurnRate(double) GetTurnRateRadians(double)
public static double MAX_TURN_RATE_RADIANS
Результат double

MAX_VELOCITY публичное статическое свойство

The maximum velocity of a robot, which is 8 pixels/turn.
public static double MAX_VELOCITY
Результат double

MIN_BULLET_POWER публичное статическое свойство

The minimum bullet power, i.e the amount of energy required for firing a bullet, which is 0.1 energy points.
public static double MIN_BULLET_POWER
Результат double

RADAR_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 static double RADAR_SCAN_RADIUS
Результат double

RADAR_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. RADAR_TURN_RATE_RADIANS Robot.IsAdjustGunForRobotTurn Robot.IsAdjustRadarForGunTurn

public static double RADAR_TURN_RATE
Результат double

RADAR_TURN_RATE_RADIANS публичное статическое свойство

The turning rate of the radar measured in radians instead of degrees. RADAR_TURN_RATE
public static double RADAR_TURN_RATE_RADIANS
Результат double

ROBOT_HIT_BONUS публичное статическое свойство

The amount of bonus given when a robot moving forward hits an opponent robot (ramming), which is 1.2 energy points.
public static double ROBOT_HIT_BONUS
Результат double

ROBOT_HIT_DAMAGE публичное статическое свойство

The amount of damage taken when a robot hits or is hit by another robot, which is 0.6 energy points.
public static double ROBOT_HIT_DAMAGE
Результат double