Show / Hide Table of Contents

Class TestBrainUpdater

The test bot brain updater.

Inheritance
object
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>
TestBrainUpdater
Implements
IBrainUpdater
Inherited Members
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.Logger
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.Brain
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.States
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.TickFrequency
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.Bots
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.Brains
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.BrainManager
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.Serializer
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.AddBrain(IBotBrain)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.SetBrain(IBotBrain)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.AddBrain(string)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.SetBrain(string)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.ClearBrains()
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.AddBotAsync(string, IBotBrain, string, int, CancellationToken)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.AddBotAsync(string, object, IBotBrain, string, int, CancellationToken)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.AddBotAsync(string, bool, IBotBrain, string, int, CancellationToken)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.RemoveBotAsync(IAutomatedBot, IBotBrain)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.Run(CancellationToken)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.RunOnce()
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.RemoveBrain(IBotBrain)
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.CreateBotAsync(string, bool, string, int)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.BotBrain.Samples.EnumBased
Assembly: BotBrain.Samples.dll
Syntax
public class TestBrainUpdater : BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>, IBrainUpdater
Remarks

Initializes a new instance of the TestBrainUpdater class.

Constructors

View Source

TestBrainUpdater(IBrainSerializer, ILogger<TestBrainUpdater>?)

The test bot brain updater.

Declaration
public TestBrainUpdater(IBrainSerializer serializer, ILogger<TestBrainUpdater>? logger = null)
Parameters
Type Name Description
IBrainSerializer serializer

The brain serializer.

ILogger<TestBrainUpdater> logger

The logger.

Remarks

Initializes a new instance of the TestBrainUpdater class.

Properties

View Source

States

Gets the game state objects associated with running bots.

Declaration
public override IReadOnlyCollection<bool> States { get; }
Property Value
Type Description
IReadOnlyCollection<bool>
Overrides
Microsoft.XboxStudios.BotBrain.Composition.BrainUpdaterBase<bool, Microsoft.XboxStudios.BotBrain.Samples.EnumBased.TestAutomatedBot, Microsoft.XboxStudios.BotBrain.Samples.EnumBased.TestBotAction>.States

Methods

View Source

AddBotAsync(string, IBotBrain?, string?, int, CancellationToken)

Adds a bot to the brain.

Declaration
public override Task<IAutomatedBot?> AddBotAsync(string deviceName, IBotBrain? brain = null, string? botName = null, int playerIndex = 0, CancellationToken token = default)
Parameters
Type Name Description
string deviceName

The device name.

IBotBrain brain

The brain to use.

string botName

The bot's name.

int playerIndex

The bot's player index.

CancellationToken token

The cancellation token.

Returns
Type Description
Task<IAutomatedBot>

The bot.

Overrides
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.AddBotAsync(string, IBotBrain, string, int, CancellationToken)
View Source

CreateBotAsync(string, bool, string, int)

Creates a bot.

Declaration
protected override Task<TestAutomatedBot> CreateBotAsync(string deviceName, bool state, string botName, int playerIndex)
Parameters
Type Name Description
string deviceName

The device name.

bool state

The game state.

string botName

The bot's name.

int playerIndex

The bot's player index.

Returns
Type Description
Task<TestAutomatedBot>

The bot.

Overrides
BrainUpdaterBase<bool, TestAutomatedBot, TestBotAction>.CreateBotAsync(string, bool, string, int)

Implements

IBrainUpdater
  • View Source
In this article
Back to top Generated by DocFX