Class InitialPosition
Initial starting position containing a start coordinate (x,y) and angle.
The initial position is only used when debugging to request the server to let a bot start at a specific position. Note that initial starting positions must be enabled at the server-side; otherwise the initial starting position is ignored.
Inherited Members
Namespace: Robocode.TankRoyale.BotApi
Assembly: Robocode.TankRoyale.BotApi.dll
Syntax
public sealed class InitialPosition
Constructors
| Edit this page View SourceInitialPosition(double?, double?, double?)
Initializes a new instance of the InitialPosition class.
Declaration
public InitialPosition(double? x, double? y, double? direction)
Parameters
Type | Name | Description |
---|---|---|
double? | x | The x coordinate, where |
double? | y | The x coordinate, where |
double? | direction | The shared direction of the body, gun, and radar, where |
Properties
| Edit this page View SourceDirection
The shared direction of the body, gun, and radar.
Declaration
public double? Direction { get; }
Property Value
Type | Description |
---|---|
double? |
X
The x coordinate.
Declaration
public double? X { get; }
Property Value
Type | Description |
---|---|
double? |
Y
The Y coordinate.
Declaration
public double? Y { get; }
Property Value
Type | Description |
---|---|
double? |
Methods
| Edit this page View SourceEquals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
| Edit this page View SourceFromString(string)
Declaration
public static InitialPosition FromString(string initialPosition)
Parameters
Type | Name | Description |
---|---|---|
string | initialPosition |
Returns
Type | Description |
---|---|
InitialPosition |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
| Edit this page View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |