Interface BotInfo.IBuilder
Builder interface for providing a builder for building BotInfo objects, and which supports method chaining.
Namespace: Robocode.TankRoyale.BotApi
Assembly: api.dll
Syntax
public interface BotInfo.IBuilder
Methods
| Edit this page View SourceAddAuthor(string)
Adds an author of the bot (required).
The maximum number of characters accepted for an author name is 20.
The maximum number of authors accepted is 20.
See SetAuthors(IEnumerable<string>) for more details.
Declaration
BotInfo.IBuilder AddAuthor(string author)
Parameters
| Type | Name | Description |
|---|---|---|
| string | author | The name of an author to add. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
See Also
| Edit this page View SourceAddCountryCode(string)
Adds a country code for the bot (optional). See SetCountryCodes(IEnumerable<string>) for more details.
The maximum number of country codes accepted is 20.
Declaration
BotInfo.IBuilder AddCountryCode(string countryCode)
Parameters
| Type | Name | Description |
|---|---|---|
| string | countryCode | The country code to add. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
See Also
| Edit this page View SourceAddGameType(string)
Adds a game type that this bot is capable of participating in (required). See SetGameTypes(ISet<string>) for more details.
The maximum number of game types accepted is 10.
The maximum number of characters accepted for a game type is 20.
Declaration
BotInfo.IBuilder AddGameType(string gameType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | gameType | A game type that the bot is capable of participating in. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
BotInfo.Builder()
.AddGameType(GameType.Classic)
.AddGameType(GameType.Melee)
...
See Also
| Edit this page View SourceBuild()
Builds and returns the BotInfo instance based on the data set and added to this builder so far. This method is typically the last method to call on the builder in order to extract the result of building.
Declaration
BotInfo Build()
Returns
| Type | Description |
|---|---|
| BotInfo | A BotInfo instance. |
Copy(BotInfo)
Copies all fields from a BotInfo instance into this builder.
Declaration
BotInfo.IBuilder Copy(BotInfo botInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| BotInfo | botInfo | The BotInfo instance to copy. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
SetAuthors(IEnumerable<string>)
Sets the names(s) of the author(s) of the bot (required).
The maximum number of characters accepted for an author name is 20.
The maximum number of authors accepted is 20.
Declaration
BotInfo.IBuilder SetAuthors(IEnumerable<string> authors)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | authors | A list containing the names(s) of the author(s). A |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
"John Doe"
See Also
| Edit this page View SourceSetCountryCodes(IEnumerable<string>)
Sets the country codes for the bot (optional).
The maximum length of each country code is 2 (alpha-2) from the ISO 3166 international standard.
The maximum number of country codes accepted is 20.
Declaration
BotInfo.IBuilder SetCountryCodes(IEnumerable<string> countryCodes)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<string> | countryCodes | A list containing the country codes. A |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
"dk"
See Also
| Edit this page View SourceSetDescription(string)
Sets a short description of the bot (optional).
Line-breaks (line-feed / new-line character) are supported, but only expect up to 3 lines to be displayed on a UI.
The maximum number of characters accepted for the description is 250.
Declaration
BotInfo.IBuilder SetDescription(string description)
Parameters
| Type | Name | Description |
|---|---|---|
| string | description | A short description of the bot. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
"The rampage bot will try to ram bots that are very close.\n
Sneaks around the corners and shoot at the bots that come too near."
|
Edit this page
View Source
SetGameTypes(ISet<string>)
Sets the game types that this bot is capable of participating in (required)
The standard game types are listed here
Note that more game types might be added in the future.
The GameType class contains the string for the current predefined game types, which can be used when setting the game types of this method.
The maximum number of game types accepted is 10.
The maximum number of characters accepted for a game type is 20.
Declaration
BotInfo.IBuilder SetGameTypes(ISet<string> gameTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| ISet<string> | gameTypes | A list of game types that the bot is capable of participating in. A |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
Example of game type: "classic"
Example of usage:
BotInfo.Builder()
.SetGameTypes(new List { GameType.Classic, GameType.Melee, "future-type" })
...
See Also
| Edit this page View SourceSetHomepage(string)
Sets a link to the homepage for the bot (optional).
The maximum number of characters accepted for the link to the homepage is 150.
Declaration
BotInfo.IBuilder SetHomepage(string homepage)
Parameters
| Type | Name | Description |
|---|---|---|
| string | homepage | A link to a homepage for the bot. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
"https://fictive-homepage.net/Rampage"
| Edit this page View SourceSetInitialPosition(InitialPosition)
Sets the initial position of this bot (optional)
Note that initial positions must be enabled/allowed with the game (server) in order to take effect.
Declaration
BotInfo.IBuilder SetInitialPosition(InitialPosition initialPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| InitialPosition | initialPosition | The initial position of this bot. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
SetName(string)
Sets the bot name (required).
The maximum number of characters accepted for the name is 30.
Declaration
BotInfo.IBuilder SetName(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of the bot. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
"Rampage"
| Edit this page View SourceSetPlatform(string)
Sets the name of the platform that this bot is build for (optional).
If the platform is set to null or a blank string, then this default string will be used based on this
code: Assembly.GetEntryAssembly()?.GetCustomAttribute<TargetFrameworkAttribute>()?.FrameworkName.
The maximum number of characters accepted for a game type is 20.
Declaration
BotInfo.IBuilder SetPlatform(string platform)
Parameters
| Type | Name | Description |
|---|---|---|
| string | platform | The name of the platform that this bot is build for. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
SetProgrammingLang(string)
Sets the name of the programming language used for developing this bot (optional)
The maximum number of characters accepted for the programming language name is 30.
Declaration
BotInfo.IBuilder SetProgrammingLang(string programmingLang)
Parameters
| Type | Name | Description |
|---|---|---|
| string | programmingLang | The name of the programming language used for developing this bot. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
SetTeamMemberName(string)
Sets the optional full name used by team APIs.
Declaration
BotInfo.IBuilder SetTeamMemberName(string teamMemberName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | teamMemberName | The full team-member name, without a display-name length limit. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This builder instance. |
SetVersion(string)
Sets the bot version (required).
The maximum number of characters accepted for the version is 20.
Declaration
BotInfo.IBuilder SetVersion(string version)
Parameters
| Type | Name | Description |
|---|---|---|
| string | version | The version of the bot. |
Returns
| Type | Description |
|---|---|
| BotInfo.IBuilder | This BotInfo instance provided for method chaining. |
Examples
"1.0"