Show / Hide Table of Contents

Class CrashyRunBrainRole

A role to launch a game and run a brain, while crashing occasionally after each action.

Inheritance
object
RoleBase
RunBrainRole
CrashyRunBrainRole
Implements
IMetadataAccess
ITestLaunchGameRole
ILaunchGameRole
IRole
IEquatable<IRole>
IBasedOn<IRole>
IBasedOn
Inherited Members
RunBrainRole.Launch
RunBrainRole.BrainName
RoleBase.DefaultNumDevices
RoleBase.Name
RoleBase.Type
RoleBase.NumDevices
RoleBase.BasedOn
RoleBase.BasedOnObject
RoleBase.ParameterNames
RoleBase.ToString()
RoleBase.Equals(object)
RoleBase.GetHashCode()
RoleBase.GetParameterMetadata(string)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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 Source

CrashyRunBrainRole(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 Source

CrashRate

Gets or sets the crash rate.

Declaration
public double CrashRate { get; set; }
Property Value
Type Description
double
View Source

SimulateLaunch

Gets a value indicating whether or not to simulate launching a game.

Declaration
public bool SimulateLaunch { get; set; }
Property Value
Type Description
bool
View Source

SimulateLaunchDelay

Gets the delay length to simulate launching a game.

Declaration
public TimeSpan SimulateLaunchDelay { get; set; }
Property Value
Type Description
TimeSpan

Methods

View Source

CreateMetadata()

Used to create parameter metadata.

Declaration
protected override MetadataContainer CreateMetadata()
Returns
Type Description
MetadataContainer

A metadata container.

Overrides
RunBrainRole.CreateMetadata()
View Source

Equals(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 other parameter; otherwise, false.

Overrides
RunBrainRole.Equals(IRole?)

Implements

IMetadataAccess
ITestLaunchGameRole
ILaunchGameRole
IRole
IEquatable<T>
IBasedOn<T>
IBasedOn
  • View Source
In this article
Back to top Generated by DocFX