Class BrainEditor<TState, TBot, TAction>
Used to edit bot brains.
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Composition
Assembly: BotBrain.Core.dll
Syntax
public class BrainEditor<TState, TBot, TAction> : IBrainEditor where TBot : IAutomatedBot<TAction>
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>. |
Remarks
Initializes a new instance of the BrainEditor<TState, TBot, TAction> class.
Constructors
View SourceBrainEditor(IServiceProvider)
Used to edit bot brains.
Declaration
public BrainEditor(IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | services | The service provider used for construction. |
Remarks
Initializes a new instance of the BrainEditor<TState, TBot, TAction> class.
Properties
View SourceConsiderationTypes
Gets an enumeration of possible consideration types.
Declaration
public virtual IEnumerable<Type> ConsiderationTypes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Type> |
UrgeTypes
Gets an enumeration of possible urge types.
Declaration
public virtual IEnumerable<Type> UrgeTypes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Type> |
Methods
View SourceCreateConsideration(string)
Creates a consideration.
Declaration
public virtual IConsideration CreateConsideration(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The consideration name, which may be missing its generic suffix. |
Returns
Type | Description |
---|---|
IConsideration | The consideration. |
CreateConsideration(Type)
Creates a consideration.
Declaration
public IConsideration CreateConsideration(Type considerationType)
Parameters
Type | Name | Description |
---|---|---|
Type | considerationType | The consideration type, which may be generic. |
Returns
Type | Description |
---|---|
IConsideration | The consideration. |
CreateUrge(string)
Creates an urge.
Declaration
public virtual IUrge CreateUrge(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The urge name. |
Returns
Type | Description |
---|---|
IUrge | The urge. |
GetRequiredService<T>(Type)
Gets an instance of the given type from the service provider.
Declaration
protected T GetRequiredService<T>(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type to construct. |
Returns
Type | Description |
---|---|
T | An instance of the given type. |
Type Parameters
Name | Description |
---|---|
T | The target type to cast to. |