Show / Hide Table of Contents

Struct UrgeResult<TState, TBot, TAction>

Represents an urge and one of its recommended actions.

Implements
IUrgeResult
IEquatable<IUrgeResult>
IEquatable<UrgeResult<TState, TBot, TAction>>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
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 Source

UrgeResult(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 Source

Action

Gets the action recommended by the urge.

Declaration
public IRecommendedAction<TAction> Action { get; }
Property Value
Type Description
IRecommendedAction<TAction>
View Source

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 Source

Equals(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.

View Source

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.

View Source

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 obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)
View Source

GetHashCode()

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
ValueType.GetHashCode()
View Source

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string ToString()
Returns
Type Description
string

The fully qualified type name.

Overrides
ValueType.ToString()

Operators

View Source

operator ==(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.

View Source

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.

Implements

IUrgeResult
IEquatable<T>
IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX