Class LaunchGame
The overmind urge responsible for launching games.
Inheritance
LaunchGame
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public class LaunchGame : OvermindUrgeBase, IUrge<OvermindState, OvermindBot, OvermindAction>, IUrge, IEquatable<IUrge?>
Remarks
Initializes a new instance of the LaunchGame class.
Constructors
View SourceLaunchGame(string?, ILogger<LaunchGame>?)
The overmind urge responsible for launching games.
Declaration
public LaunchGame(string? name = null, ILogger<LaunchGame>? logger = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | The urge name. |
ILogger<LaunchGame> | logger | The logger to use. |
Remarks
Initializes a new instance of the LaunchGame class.
Properties
View SourceGameStateName
Gets a description of the game state type.
Declaration
protected virtual string GameStateName { get; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceCreateGameStateAsync(IDevice, IRoleBasedScenario, ILaunchGameRole)
Creates the game state.
Declaration
protected virtual Task<object> CreateGameStateAsync(IDevice device, IRoleBasedScenario scenario, ILaunchGameRole role)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device to use. |
IRoleBasedScenario | scenario | The scenario. |
ILaunchGameRole | role | The role. |
Returns
Type | Description |
---|---|
Task<object> | A state object. |
PerformLaunch(IDevice, IRoleBasedScenario, ILaunchGameRole)
Launches a game.
Declaration
protected virtual IDeviceOperation PerformLaunch(IDevice device, IRoleBasedScenario scenario, ILaunchGameRole role)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device to use. |
IRoleBasedScenario | scenario | The scenario. |
ILaunchGameRole | role | The role. |
Returns
Type | Description |
---|---|
IDeviceOperation | A device operation to launch a game. |
RunSync(OvermindState, OvermindBot)
Runs the urge synchronously.
Declaration
protected override IEnumerable<IRecommendedAction<OvermindAction>> RunSync(OvermindState state, OvermindBot bot)
Parameters
Type | Name | Description |
---|---|---|
OvermindState | state | The game state. |
OvermindBot | bot | The bot to control. |
Returns
Type | Description |
---|---|
IEnumerable<IRecommendedAction<OvermindAction>> | An enumerable of weighted bot actions. |