Show / Hide Table of Contents

Class FakeUrge

A fake urge used for testing.

Inheritance
object
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>
FakeUrge
FakeModifyBrainUrge
FakeUrge2
Implements
IUrge<bool, FakeBot<FakeBotAction>, FakeBotAction>
IUrge
IEquatable<IUrge>
Inherited Members
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.NoUrgeName
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.Logger
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.Name
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.Type
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.IsExclusive
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.ToString()
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.Equals(IUrge)
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.Equals(object)
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.GetHashCode()
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.Run(bool, FakeBot<FakeBotAction>)
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.GetParameter<T>(FakeBot<FakeBotAction>, string)
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.GetParameter<T>(FakeBot<FakeBotAction>, IEnumerable<string>)
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.TryGetParameter<T>(FakeBot<FakeBotAction>, IEnumerable<string>, out T)
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.TryGetParameter<T>(FakeBot<FakeBotAction>, string, out T)
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.GetParameterNames(string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.BotBrain.Tests
Assembly: BotBrain.Core.Tests.dll
Syntax
public class FakeUrge : UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>, IUrge<bool, FakeBot<FakeBotAction>, FakeBotAction>, IUrge, IEquatable<IUrge?>

Constructors

View Source

FakeUrge(string?, ILogger<FakeUrge>?)

A fake urge used for testing.

Declaration
public FakeUrge(string? name = null, ILogger<FakeUrge>? logger = null)
Parameters
Type Name Description
string name
ILogger<FakeUrge> logger

The logger to use.

Properties

View Source

ActionName

Gets or sets the action name to recommend.

Declaration
[DataMember]
public string? ActionName { get; set; }
Property Value
Type Description
string

Methods

View Source

Run(bool, FakeBot<FakeBotAction>)

Chooses an action and urgency of that action for the given bot and state.

Declaration
public override Task<IEnumerable<IRecommendedAction<FakeBotAction>>> Run(bool state, FakeBot<FakeBotAction> bot)
Parameters
Type Name Description
bool state

The game state.

FakeBot<FakeBotAction> bot

The bot to control.

Returns
Type Description
Task<IEnumerable<IRecommendedAction<FakeBotAction>>>

An enumerable of weighted bot actions.

Overrides
UrgeBase<bool, FakeBot<FakeBotAction>, FakeBotAction>.Run(bool, FakeBot<FakeBotAction>)
View Source

RunImpl(bool, FakeBot<FakeBotAction>)

Runs the urge given the existing game state, returning one or more weighted bot actions.

Declaration
protected virtual IEnumerable<IRecommendedAction<FakeBotAction>> RunImpl(bool state, FakeBot<FakeBotAction> bot)
Parameters
Type Name Description
bool state

The game state.

FakeBot<FakeBotAction> bot

The bot to control.

Returns
Type Description
IEnumerable<IRecommendedAction<FakeBotAction>>

An enumeration of weighted bot actions.

Implements

IUrge<TState, TBot, TAction>
IUrge
IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX