Class ModifyBrainAction
Contains helper methods to modify the brain for a specific bot.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain
Assembly: BotBrain.Core.dll
Syntax
public static class ModifyBrainAction
Methods
View SourceDisableUrges<TState, TBot, TAction>(IBotBrain<TState, TBot, TAction>, TBot, IEnumerable<IUrge<TState, TBot, TAction>>)
Disables urges so that they aren't considered.
Declaration
public static void DisableUrges<TState, TBot, TAction>(IBotBrain<TState, TBot, TAction> brain, TBot bot, IEnumerable<IUrge<TState, TBot, TAction>> urgesToDisable) where TBot : IAutomatedBot<TAction>
Parameters
Type | Name | Description |
---|---|---|
IBotBrain<TState, TBot, TAction> | brain | The brain. |
TBot | bot | The bot. |
IEnumerable<IUrge<TState, TBot, TAction>> | urgesToDisable | The urges to disable. |
Type Parameters
Name | Description |
---|---|
TState | A title-specific state object. |
TBot | A title-specific bot object that implements IAutomatedBot<TAction>. |
TAction | The title-specific bot action that implements IEquatable<T>. |
EnableUrges<TState, TBot, TAction>(IBotBrain<TState, TBot, TAction>, TBot, IEnumerable<IUrge<TState, TBot, TAction>>)
Enables urges so that they are considered.
Declaration
public static void EnableUrges<TState, TBot, TAction>(IBotBrain<TState, TBot, TAction> brain, TBot bot, IEnumerable<IUrge<TState, TBot, TAction>> urgesToEnable) where TBot : IAutomatedBot<TAction>
Parameters
Type | Name | Description |
---|---|---|
IBotBrain<TState, TBot, TAction> | brain | The brain. |
TBot | bot | The bot. |
IEnumerable<IUrge<TState, TBot, TAction>> | urgesToEnable | The urges to enable. |
Type Parameters
Name | Description |
---|---|
TState | A title-specific state object. |
TBot | A title-specific bot object that implements IAutomatedBot<TAction>. |
TAction | The title-specific bot action that implements IEquatable<T>. |
RevertParameters(IHasParameters)
Reverts any custom parameters so the bot uses the brain's defaults.
Declaration
public static void RevertParameters(IHasParameters bot)
Parameters
Type | Name | Description |
---|---|---|
IHasParameters | bot | The bot. |
RevertUrges<TState, TBot, TAction>(IBotBrain<TState, TBot, TAction>, TBot)
Reverts any changes to the default brain urges.
Declaration
public static void RevertUrges<TState, TBot, TAction>(IBotBrain<TState, TBot, TAction> brain, TBot bot) where TBot : IAutomatedBot<TAction>
Parameters
Type | Name | Description |
---|---|---|
IBotBrain<TState, TBot, TAction> | brain | The brain. |
TBot | bot | The bot. |
Type Parameters
Name | Description |
---|---|
TState | A title-specific state object. |
TBot | A title-specific bot object that implements IAutomatedBot<TAction>. |
TAction | The title-specific bot action that implements IEquatable<T>. |
SetParameters(IHasParameters, IDictionary<string, object?>)
Sets custom parameters for the bot.
Declaration
public static void SetParameters(IHasParameters bot, IDictionary<string, object?> parameters)
Parameters
Type | Name | Description |
---|---|---|
IHasParameters | bot | The bot. |
IDictionary<string, object> | parameters | The parameters. |