Class SimpleUrge
A basic test urge.
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Samples.ClassBased.Urges
Assembly: BotBrain.Samples.dll
Syntax
public class SimpleUrge : UrgeBase<TestGameState, TestAutomatedBot, TestAction>, IUrge<TestGameState, TestAutomatedBot, TestAction>, IUrge, IEquatable<IUrge?>, IMetadataAccess
Constructors
View SourceSimpleUrge()
Initializes a new instance of the SimpleUrge class.
Declaration
public SimpleUrge()
Properties
View SourceActionType
Gets or sets the recommended action type.
Declaration
[JsonProperty]
[JsonConverter(typeof(StringEnumConverter))]
public TestBotActionType ActionType { get; set; }
Property Value
Type | Description |
---|---|
TestBotActionType |
ParameterNames
Gets an enumeration of parameter names.
Declaration
public IEnumerable<string> ParameterNames { get; }
Property Value
Type | Description |
---|---|
IEnumerable<string> |
Methods
View SourceEquals(IUrge?)
Determines whether the specified urge is equal to this one.
Declaration
public override bool Equals(IUrge? other)
Parameters
Type | Name | Description |
---|---|---|
IUrge | other | The urge to compare to. |
Returns
Type | Description |
---|---|
bool | True if the urges are equal. |
Overrides
Microsoft.XboxStudios.BotBrain.UrgeBase<Microsoft.XboxStudios.BotBrain.Samples.ClassBased.TestGameState, Microsoft.XboxStudios.BotBrain.Samples.ClassBased.TestAutomatedBot, Microsoft.XboxStudios.BotBrain.Samples.ClassBased.TestAction>.Equals(Microsoft.XboxStudios.BotBrain.IUrge)
View Source
GetParameterMetadata(string)
Gets the metadata for a parameter.
Declaration
public ParameterMetadata? GetParameterMetadata(string parameterName)
Parameters
Type | Name | Description |
---|---|---|
string | parameterName | The parameter name. |
Returns
Type | Description |
---|---|
ParameterMetadata | The metadata, if it exists. |
Run(TestGameState, TestAutomatedBot)
Chooses an action and urgency of that action for the given bot and state.
Declaration
public override Task<IEnumerable<IRecommendedAction<TestAction>>> Run(TestGameState state, TestAutomatedBot bot)
Parameters
Type | Name | Description |
---|---|---|
TestGameState | state | The game state. |
TestAutomatedBot | bot | The bot to control. |
Returns
Type | Description |
---|---|
Task<IEnumerable<IRecommendedAction<TestAction>>> | An enumerable of weighted bot actions. |