Show / Hide Table of Contents

Interface IBot

Interface for a bot that extends the core API with convenient methods for movement, turning, and firing the gun.

Inherited Members
IBaseBot.TeamMessageMaxSize
IBaseBot.MaxNumberOfTeamMessagesPerTurn
IBaseBot.MaxLogicalTeamMessagesPerTurn
IBaseBot.TeamMessagesMaxBytesPerTurn
IBaseBot.Start()
IBaseBot.Go()
IBaseBot.MyId
IBaseBot.Variant
IBaseBot.Version
IBaseBot.GameType
IBaseBot.ArenaWidth
IBaseBot.ArenaHeight
IBaseBot.NumberOfRounds
IBaseBot.GunCoolingRate
IBaseBot.MaxInactivityTurns
IBaseBot.TurnTimeout
IBaseBot.TimeLeft
IBaseBot.RoundNumber
IBaseBot.TurnNumber
IBaseBot.EnemyCount
IBaseBot.Energy
IBaseBot.IsDisabled
IBaseBot.X
IBaseBot.Y
IBaseBot.Direction
IBaseBot.GunDirection
IBaseBot.RadarDirection
IBaseBot.Speed
IBaseBot.GunHeat
IBaseBot.BulletStates
IBaseBot.Events
IBaseBot.ClearEvents()
IBaseBot.TurnRate
IBaseBot.MaxTurnRate
IBaseBot.GunTurnRate
IBaseBot.MaxGunTurnRate
IBaseBot.RadarTurnRate
IBaseBot.MaxRadarTurnRate
IBaseBot.TargetSpeed
IBaseBot.MaxSpeed
IBaseBot.SetFire(double)
IBaseBot.Firepower
IBaseBot.SetRescan()
IBaseBot.SetFireAssist(bool)
IBaseBot.Interruptible
IBaseBot.AdjustGunForBodyTurn
IBaseBot.AdjustRadarForBodyTurn
IBaseBot.AdjustRadarForGunTurn
IBaseBot.AddCustomEvent(Condition)
IBaseBot.RemoveCustomEvent(Condition)
IBaseBot.SetStop()
IBaseBot.SetStop(bool)
IBaseBot.SetResume()
IBaseBot.IsStopped
IBaseBot.TeammateIds
IBaseBot.GetBotName(int)
IBaseBot.IsTeammate(int)
IBaseBot.BroadcastTeamMessage(object)
IBaseBot.BroadcastTeamMessageBatch(IEnumerable)
IBaseBot.SendTeamMessage(int, object)
IBaseBot.SendTeamMessageBatch(int, IEnumerable)
IBaseBot.BodyColor
IBaseBot.TurretColor
IBaseBot.RadarColor
IBaseBot.BulletColor
IBaseBot.ScanColor
IBaseBot.TracksColor
IBaseBot.GunColor
IBaseBot.IsDebuggingEnabled
IBaseBot.Graphics
IBaseBot.OnConnected(ConnectedEvent)
IBaseBot.OnDisconnected(DisconnectedEvent)
IBaseBot.OnConnectionError(ConnectionErrorEvent)
IBaseBot.OnGameStarted(GameStartedEvent)
IBaseBot.OnGameEnded(GameEndedEvent)
IBaseBot.OnRoundStarted(RoundStartedEvent)
IBaseBot.OnRoundEnded(RoundEndedEvent)
IBaseBot.OnTick(TickEvent)
IBaseBot.OnBotDeath(BotDeathEvent)
IBaseBot.OnDeath(DeathEvent)
IBaseBot.OnHitBot(HitBotEvent)
IBaseBot.OnHitWall(HitWallEvent)
IBaseBot.OnBulletFired(BulletFiredEvent)
IBaseBot.OnHitByBullet(HitByBulletEvent)
IBaseBot.OnBulletHit(BulletHitBotEvent)
IBaseBot.OnBulletHitBullet(BulletHitBulletEvent)
IBaseBot.OnBulletHitWall(BulletHitWallEvent)
IBaseBot.OnScannedBot(ScannedBotEvent)
IBaseBot.OnSkippedTurn(SkippedTurnEvent)
IBaseBot.OnWonRound(WonRoundEvent)
IBaseBot.OnCustomEvent(CustomEvent)
IBaseBot.OnTeamMessage(TeamMessageEvent)
IBaseBot.CalcMaxTurnRate(double)
IBaseBot.CalcBulletSpeed(double)
IBaseBot.CalcGunHeat(double)
IBaseBot.CalcBearing(double)
IBaseBot.CalcGunBearing(double)
IBaseBot.CalcRadarBearing(double)
IBaseBot.DirectionTo(double, double)
IBaseBot.BearingTo(double, double)
IBaseBot.GunBearingTo(double, double)
IBaseBot.RadarBearingTo(double, double)
IBaseBot.DistanceTo(double, double)
IBaseBot.NormalizeAbsoluteAngle(double)
IBaseBot.NormalizeRelativeAngle(double)
IBaseBot.CalcDeltaAngle(double, double)
IBaseBot.GetEventPriority(Type)
IBaseBot.SetEventPriority(Type, int)
Namespace: Robocode.TankRoyale.BotApi
Assembly: api.dll
Syntax
[PublicAPI]
public interface IBot : IBaseBot

Properties

| Edit this page View Source

DistanceRemaining

The distance remaining till the bot has finished moving after having called SetForward(double), SetBack(double), Forward(double), or Back(double) When the distance remaining has reached 0, the bot has finished its current move.

When the distance remaining is positive, the bot is moving forward. When the distance remaining is negative, the bot is moving backward.

Declaration
double DistanceRemaining { get; }
Property Value
Type Description
double

The remaining distance to move before its current movement is completed. If PositiveInfinity the bot will move forward infinitely. If NegativeInfinity the bot will move backward infinitely.

See Also
SetForward(double)
SetBack(double)
Forward(double)
Back(double)
| Edit this page View Source

GunTurnRemaining

The remaining turn in degrees till the gun has finished turning after having called SetTurnGunLeft(double), SetTurnGunRight(double), TurnGunLeft(double), or TurnGunRight(double)". When the turn remaining has reached 0, the gun has finished turning.

When the turn remaining is positive, the bot is turning to the left (along the unit circle). When the turn remaining is negative, the bot is turning to the right.

Declaration
double GunTurnRemaining { get; }
Property Value
Type Description
double

The remaining degrees to turn the gun before its current turning is completed. If PositiveInfinity the gun will turn left infinitely. If NegativeInfinity the gun will turn right infinitely.

See Also
SetTurnGunLeft(double)
SetTurnGunRight(double)
TurnGunLeft(double)
TurnGunRight(double)
| Edit this page View Source

IsRunning

Checks if this bot is running.

Declaration
bool IsRunning { get; }
Property Value
Type Description
bool

true when the bot is running, false otherwise.

| Edit this page View Source

RadarTurnRemaining

The remaining turn in degrees till the radar has finished turning after having called SetTurnRadarLeft(double), SetTurnRadarRight(double), TurnRadarLeft(double), or TurnRadarRight(double). When the turn remaining has reached 0, the radar has finished turning.

When the turn remaining is positive, the bot is turning to the left (along the unit circle). When the turn remaining is negative, the bot is turning to the right.

Declaration
double RadarTurnRemaining { get; }
Property Value
Type Description
double

The remaining degrees to turn the radar before its current turning is completed. If PositiveInfinity the radar will turn left infinitely. If NegativeInfinity the radar will turn right infinitely.

See Also
SetTurnRadarLeft(double)
SetTurnRadarRight(double)
TurnRadarLeft(double)
TurnRadarRight(double)
| Edit this page View Source

TurnRemaining

The remaining turn in degrees till the bot has finished turning after having called SetTurnLeft(double), SetTurnRight(double), TurnLeft(double), or TurnRight(double). When the turn remaining has reached 0, the bot has finished turning.

When the turn remaining is positive, the bot is turning to the left (along the unit circle). When the turn remaining is negative, the bot is turning to the right.

Declaration
double TurnRemaining { get; }
Property Value
Type Description
double

The remaining degrees to turn before its current turning is completed. If PositiveInfinity the bot will turn left infinitely. If NegativeInfinity the bot will turn right infinitely.

See Also
SetTurnLeft(double)
SetTurnRight(double)
TurnLeft(double)
TurnRight(double)

Methods

| Edit this page View Source

Back(double)

Moves the bot backward until it has traveled a specific distance from its current position, or it is moving into an obstacle. The speed is limited by MaxSpeed.

When the bot is moving forward, the Acceleration determines the acceleration of the bot that adds 1 additional unit to the speed per turn while accelerating. However, the bot is faster at braking. The Deceleration determines the deceleration of the bot that subtracts 2 units from the speed per turn.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to TargetSpeed, SetForward(double), and SetBack(double) methods.

Declaration
void Back(double distance)
Parameters
Type Name Description
double distance

Is the distance to move backward. If negative, the bot will move forward. If PositiveInfinity the bot will move backward infinitely. If NegativeInfinity the bot will move forward infinitely.

See Also
SetForward(double)
SetBack(double)
Forward(double)
DistanceRemaining
TargetSpeed
| Edit this page View Source

Fire(double)

Fire the gun in the direction as the gun is pointing.

note

Your bot is spending energy when firing a bullet, the amount of energy used for firing the bullet is taken from the bot. The amount of energy loss is equal to the firepower.

If the bullet hits an opponent bot, you will gain energy from the bullet hit. When hitting another bot, your bot will be rewarded and retrieve an energy boost of 3x firepower.

The gun will only fire when the firepower is at MinFirepower or higher. If the firepower is more than MaxFirepower, the power will be truncated to the MaxFirepower.

Whenever the gun is fired, the gun is heated and needs to cool down before it can fire again. The gun heat must be zero before the gun can fire (see GunHeat. The gun heat generated by firing the gun is 1 + (firepower / 5). Hence, the more firepower used the longer it takes to cool down the gun. The gun cooling rate can be read from GunCoolingRate.

The amount of energy used for firing the gun is subtracted from the bot's total energy. The amount of damage dealt by a bullet hitting another bot is 4x firepower, and if the firepower is greater than 1 it will do an additional 2 x (firepower - 1) damage.

The firepower is truncated to MinFirepower and MaxFirepower if the firepower exceeds these values.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to setting SetFire(double).

Declaration
void Fire(double firepower)
Parameters
Type Name Description
double firepower

Is the amount of energy spent on firing the gun. You cannot spend more energy than available from the bot. The bullet power must be > MinFirepower.

See Also
OnBulletFired(BulletFiredEvent)
SetFire(double)
GunHeat
GunCoolingRate
| Edit this page View Source

Forward(double)

Moves the bot forward until it has traveled a specific distance from its current position, or it is moving into an obstacle. The speed is limited by MaxSpeed.

When the bot is moving forward, the Acceleration determine the acceleration of the bot that adds 1 additional unit to the speed per turn while accelerating. However, the bot is faster at braking. The Deceleration determines the deceleration of the bot that subtracts 2 units from the speed per turn.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to TargetSpeed, SetForward(double), and SetBack(double) methods.

Declaration
void Forward(double distance)
Parameters
Type Name Description
double distance

Is the distance to move forward. If negative, the bot will move backward. If PositiveInfinity the bot will move forward infinitely. If NegativeInfinity the bot will move backward infinitely.

See Also
SetForward(double)
SetBack(double)
Back(double)
DistanceRemaining
TargetSpeed
| Edit this page View Source

Rescan()

Scan (again) with the radar. This method is useful if the radar has not been turning and thereby will not be able to automatically scan bots. This method is useful when the bot movement has stopped, e.g. when Stop() has been called. The last radar direction and sweep angle will be used for rescanning for bots.

Declaration
void Rescan()
See Also
Stop()
| Edit this page View Source

Resume()

Resume the movement prior to calling the SetStop() or Stop() method. This method has no effect, if it has already been called.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

Declaration
void Resume()
See Also
SetStop()
SetResume()
Stop()
| Edit this page View Source

Run()

The Run() method is used for running a program for the bot like:

public void Run()
{
  while (IsRunning)
  {
    Forward(100);
    TurnGunLeft(360);
    Back(100);
    TurnGunRight(360);
  }
}
note

The program runs in a loop in this example (as long as the bot is running), meaning that it will start moving forward as soon as TurnGunRight(double) has executed.

When running a loop that could potentially run forever. The best practice is to check if the bot is still running to stop and exit the loop. This gives the game a chance of stopping the thread running the loop in the code behind. If the thread is not stopped correctly, the bot may behave strangely in new rounds.

Declaration
void Run()
See Also
IsRunning
| Edit this page View Source

SetBack(double)

Set the bot to move backward until it has traveled a specific distance from its current position, or it is moving into an obstacle. The speed is limited by MaxSpeed

When the bot is moving forward, the Acceleration determines the acceleration of the bot that adds 1 additional unit to the speed per turn while accelerating. However, the bot is faster at braking. The Deceleration determines the deceleration of the bot that subtracts 2 units from the speed per turn.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior setting TargetSpeed as the SetForward(double) and SetBack(double) methods sets the TargetSpeed for each turn until DistanceRemaining reaches 0.

Declaration
void SetBack(double distance)
Parameters
Type Name Description
double distance

Is the distance to move backward. If negative, the bot will move forward. If PositiveInfinity the bot will move backward infinitely. If NegativeInfinity the bot will move forward infinitely.

See Also
Back(double)
SetForward(double)
Forward(double)
DistanceRemaining
TargetSpeed
| Edit this page View Source

SetForward(double)

Set the bot to move forward until it has traveled a specific distance from its current position, or it is moving into an obstacle. The speed is limited by MaxSpeed.

When the bot is moving forward, the Acceleration determines the acceleration of the bot that adds 1 additional unit to the speed per turn while accelerating. However, the bot is faster at braking. The Deceleration determines the deceleration of the bot that subtracts 2 units from the speed per turn.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior setting TargetSpeed as the SetForward(double) and SetBack(double) methods sets the TargetSpeed for each turn until DistanceRemaining reaches 0.

Declaration
void SetForward(double distance)
Parameters
Type Name Description
double distance

Is the distance to move forward. If negative, the bot will move backward. If PositiveInfinity the bot will move forward infinitely. If NegativeInfinity the bot will move backward infinitely.

See Also
Forward(double)
SetBack(double)
Back(double)
DistanceRemaining
TargetSpeed
| Edit this page View Source

SetTurnGunLeft(double)

Set the gun to turn to the left (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when GunTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxGunTurnRate.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior calls to SetTurnGunRight(double).

Declaration
void SetTurnGunLeft(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn left. If negative, the gun will turn right. If PositiveInfinity the gun will turn left infinitely. If NegativeInfinity the gun will turn right infinitely.

See Also
SetTurnGunRight(double)
TurnGunRight(double)
SetTurnRight(double)
GunTurnRemaining
GunTurnRate
| Edit this page View Source

SetTurnGunRight(double)

Set the gun to turn to the right (following the decreasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when GunTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxGunTurnRate.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior calls to SetTurnGunLeft(double).

Declaration
void SetTurnGunRight(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn right. If negative, the gun will turn left. If PositiveInfinity the gun will turn right infinitely. If NegativeInfinity the gun will turn left infinitely.

See Also
SetTurnGunLeft(double)
TurnGunRight(double)
TurnGunLeft(double)
GunTurnRemaining
GunTurnRate
| Edit this page View Source

SetTurnLeft(double)

Set the bot to turn to the left (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when TurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxTurnRate.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior calls to SetTurnRight(double).

Declaration
void SetTurnLeft(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn left. If negative, the bot will turn right. If PositiveInfinity the bot will turn left infinitely. If NegativeInfinity the bot will turn right infinitely.

See Also
SetTurnRight(double)
TurnRight(double)
TurnLeft(double)
TurnRemaining
TurnRate
| Edit this page View Source

SetTurnRadarLeft(double)

Set the radar to turn to the left (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when RadarTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxRadarTurnRate.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior calls to SetTurnRadarRight(double).

Declaration
void SetTurnRadarLeft(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn left. If negative, the radar will turn right. If PositiveInfinity the radar will turn left infinitely. If NegativeInfinity the radar will turn right infinitely.

See Also
SetTurnRadarRight(double)
TurnRadarRight(double)
TurnRadarLeft(double)
RadarTurnRemaining
RadarTurnRate
| Edit this page View Source

SetTurnRadarRight(double)

Turn the radar to the right (following the decreasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when RadarTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxRadarTurnRate.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior calls to SetTurnRadarLeft(double) and SetTurnRadarRight(double).

Declaration
void SetTurnRadarRight(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn right. If negative, the radar will turn left. If PositiveInfinity the radar will turn right infinitely. If NegativeInfinity the radar will turn left infinitely.

See Also
SetTurnRadarLeft(double)
TurnRadarLeft(double)
TurnRadarRight(double)
RadarTurnRemaining
RadarTurnRate
| Edit this page View Source

SetTurnRight(double)

Set the bot to turn to the right (following the decreasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when TurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxTurnRate.

This method will first be executed when Go() is called making it possible to call other set methods before execution. This makes it possible to set the bot to move, turn the body, radar, gun, and also fire the gun in parallel in a single turn when calling Go(). But notice that this is only possible to execute multiple methods in parallel by using setter methods only prior to calling Go().

If this method is called multiple times, the last call before Go() is executed, counts.

This method will cancel the effect of prior calls to SetTurnLeft(double).

Declaration
void SetTurnRight(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn right. If negative, the bot will turn left. If PositiveInfinity the bot will turn right infinitely. If NegativeInfinity the bot will turn left infinitely.

See Also
SetTurnLeft(double)
TurnRight(double)
TurnLeft(double)
TurnRemaining
TurnRate
| Edit this page View Source

Stop()

Stop all movement including turning the gun and radar. The remaining movement is saved for a call to SetResume() or Resume(). This method has no effect, if it has already been called.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

Declaration
void Stop()
See Also
Stop()
SetResume()
Resume()
| Edit this page View Source

Stop(bool)

Stop all movement including turning the gun and radar. The remaining movement is saved for a call to SetResume() or Resume().

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

Declaration
void Stop(bool overwrite)
Parameters
Type Name Description
bool overwrite

overwrite is set to true if the movement saved by a previous call to this method or SetStop() must be overridden with the current movement. When set to false this method is identical to SetStop().

See Also
Stop()
SetResume()
Resume()
| Edit this page View Source

TurnGunLeft(double)

Turn the gun to the left (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when GunTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxGunTurnRate.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to SetTurnGunLeft(double) and SetTurnGunRight(double)

Declaration
void TurnGunLeft(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn left. If negative, the gun will turn right. If PositiveInfinity the gun will turn left infinitely. If NegativeInfinity the gun will turn right infinitely.

See Also
SetTurnGunLeft(double)
SetTurnGunRight(double)
TurnGunRight(double)
GunTurnRemaining
GunTurnRate
| Edit this page View Source

TurnGunRight(double)

Turn the gun to the right (following the decreasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when GunTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxGunTurnRate.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to SetTurnGunLeft(double) and SetTurnGunRight(double).

Declaration
void TurnGunRight(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn right. If negative, the gun will turn left. If PositiveInfinity the gun will turn right infinitely. If NegativeInfinity the gun will turn left infinitely.

See Also
SetTurnGunLeft(double)
SetTurnGunRight(double)
TurnGunLeft(double)
GunTurnRemaining
GunTurnRate
| Edit this page View Source

TurnLeft(double)

Turn the bot to the left (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when TurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxTurnRate.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to SetTurnLeft(double) and SetTurnRight(double)

Declaration
void TurnLeft(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn left. If negative, the bot will turn right. If PositiveInfinity the bot will turn left infinitely. If NegativeInfinity the bot will turn right infinitely.

See Also
SetTurnLeft(double)
SetTurnRight(double)
TurnRight(double)
TurnRemaining
TurnRate
| Edit this page View Source

TurnRadarLeft(double)

Turn the radar to the left (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when RadarTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxRadarTurnRate.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to SetTurnRadarLeft(double) and SetTurnRadarRight(double).

Declaration
void TurnRadarLeft(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn left. If negative, the radar will turn right. If PositiveInfinity the radar will turn left infinitely. If NegativeInfinity the radar will turn right infinitely.

See Also
SetTurnRadarLeft(double)
SetTurnRadarRight(double)
TurnRadarLeft(double)
RadarTurnRemaining
RadarTurnRate
| Edit this page View Source

TurnRadarRight(double)

Turn the radar to the right (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when RadarTurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxRadarTurnRate.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to SetTurnRadarLeft(double) and SetTurnRadarRight(double).

Declaration
void TurnRadarRight(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn right. If negative, the radar will turn left. If PositiveInfinity the radar will turn right infinitely. If NegativeInfinity the radar will turn left infinitely.

See Also
SetTurnRadarLeft(double)
SetTurnRadarRight(double)
TurnRadarRight(double)
RadarTurnRemaining
RadarTurnRate
| Edit this page View Source

TurnRight(double)

Turn the bot to the right (following the increasing degrees of the unit circle) until it turned the specified amount of degrees. That is, when TurnRemaining is 0. The amount of degrees to turn each turn is limited by MaxTurnRate.

This call is executed immediately by calling Go() in the code behind. This method will block until it has been completed, which can take one to several turns. New commands will first take place after this method is completed. If you need to execute multiple commands in parallel, use setter methods instead of this blocking method.

This method will cancel the effect of prior calls to SetTurnLeft(double) and SetTurnRight(double)

Declaration
void TurnRight(double degrees)
Parameters
Type Name Description
double degrees

Is the amount of degrees to turn right. If negative, the bot will turn left. If PositiveInfinity the bot will turn right infinitely. If NegativeInfinity the bot will turn left infinitely.

See Also
SetTurnLeft(double)
SetTurnRight(double)
TurnLeft(double)
TurnRemaining
TurnRate
| Edit this page View Source

WaitFor(Condition)

Blocks until a condition is met, i.e. when a Test() returns true.

Declaration
void WaitFor(Condition condition)
Parameters
Type Name Description
Condition condition
See Also
Condition
OnCustomEvent(CustomEvent)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX