Struct UrgeResult<TState, TBot, TAction>
Represents an urge and one of its recommended actions.
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain
Assembly: BotBrain.Core.dll
Syntax
public readonly struct UrgeResult<TState, TBot, TAction> : IUrgeResult, IEquatable<IUrgeResult>, IEquatable<UrgeResult<TState, TBot, TAction>> where TBot : IAutomatedBot<TAction>
Type Parameters
Name | Description |
---|---|
TState | The game state type. |
TBot | The bot type. |
TAction | The action type. |
Remarks
Initializes a new instance of the UrgeResult<TState, TBot, TAction> struct.
Constructors
View SourceUrgeResult(IUrge<TState, TBot, TAction>, IRecommendedAction<TAction>)
Represents an urge and one of its recommended actions.
Declaration
public UrgeResult(IUrge<TState, TBot, TAction> urge, IRecommendedAction<TAction> action)
Parameters
Type | Name | Description |
---|---|---|
IUrge<TState, TBot, TAction> | urge | The urge for this result. |
IRecommendedAction<TAction> | action | The action recommended for this result. |
Remarks
Initializes a new instance of the UrgeResult<TState, TBot, TAction> struct.
Properties
View SourceAction
Gets the action recommended by the urge.
Declaration
public IRecommendedAction<TAction> Action { get; }
Property Value
Type | Description |
---|---|
IRecommendedAction<TAction> |
Urge
Gets the urge that created this result.
Declaration
public IUrge<TState, TBot, TAction> Urge { get; }
Property Value
Type | Description |
---|---|
IUrge<TState, TBot, TAction> |
Methods
View SourceEquals(IUrgeResult?)
Determines if the given objects are equal.
Declaration
public bool Equals(IUrgeResult? other)
Parameters
Type | Name | Description |
---|---|---|
IUrgeResult | other | The other object. |
Returns
Type | Description |
---|---|
bool | True if the objects are equal. |
Equals(UrgeResult<TState, TBot, TAction>)
Determines if the given objects are equal.
Declaration
public bool Equals(UrgeResult<TState, TBot, TAction> other)
Parameters
Type | Name | Description |
---|---|---|
UrgeResult<TState, TBot, TAction> | other | The other object. |
Returns
Type | Description |
---|---|
bool | True if the objects are equal. |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
View Sourceoperator ==(UrgeResult<TState, TBot, TAction>, IUrgeResult)
Determines if the urge results are equal to each other.
Declaration
public static bool operator ==(UrgeResult<TState, TBot, TAction> left, IUrgeResult right)
Parameters
Type | Name | Description |
---|---|---|
UrgeResult<TState, TBot, TAction> | left | The first urge result to compare. |
IUrgeResult | right | The second urge result to compare. |
Returns
Type | Description |
---|---|
bool | True if the urge results are equal. |
operator !=(UrgeResult<TState, TBot, TAction>, IUrgeResult)
Determines if the urge results are not equal to each other.
Declaration
public static bool operator !=(UrgeResult<TState, TBot, TAction> left, IUrgeResult right)
Parameters
Type | Name | Description |
---|---|---|
UrgeResult<TState, TBot, TAction> | left | The first urge result to compare. |
IUrgeResult | right | The second urge result to compare. |
Returns
Type | Description |
---|---|
bool | True if the urge results are not equal. |