Class CrashyRunBrainRole
A role to launch a game and run a brain, while crashing occasionally after each action.
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Samples.Meta
Assembly: BotBrain.Samples.dll
Syntax
public class CrashyRunBrainRole : RunBrainRole, IMetadataAccess, ITestLaunchGameRole, ILaunchGameRole, IRole, IEquatable<IRole>, IBasedOn<IRole>, IBasedOn
Remarks
Initializes a new instance of the CrashyRunBrainRole class.
Constructors
View SourceCrashyRunBrainRole(string?, GameConfiguration?, string?, int, double)
A role to launch a game and run a brain, while crashing occasionally after each action.
Declaration
public CrashyRunBrainRole(string? name = null, GameConfiguration? launch = null, string? brainName = null, int numDevices = 1, double crashRate = 0)
Parameters
Type | Name | Description |
---|---|---|
string | name | The role name. |
GameConfiguration | launch | The game to launch. |
string | brainName | The brain to run. |
int | numDevices | The number of devices in this role. |
double | crashRate | The crash rate. |
Remarks
Initializes a new instance of the CrashyRunBrainRole class.
Properties
View SourceCrashRate
Gets or sets the crash rate.
Declaration
public double CrashRate { get; set; }
Property Value
Type | Description |
---|---|
double |
SimulateLaunch
Gets a value indicating whether or not to simulate launching a game.
Declaration
public bool SimulateLaunch { get; set; }
Property Value
Type | Description |
---|---|
bool |
SimulateLaunchDelay
Gets the delay length to simulate launching a game.
Declaration
public TimeSpan SimulateLaunchDelay { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Methods
View SourceCreateMetadata()
Used to create parameter metadata.
Declaration
protected override MetadataContainer CreateMetadata()
Returns
Type | Description |
---|---|
MetadataContainer | A metadata container. |
Overrides
View SourceEquals(IRole?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(IRole? other)
Parameters
Type | Name | Description |
---|---|---|
IRole | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |