HumanPlayerGetActionAsync Method

Creates a new TaskCompletionSourceTResult for GameAction and asynchronously waits until it is set by calling the SetAction(GameAction) method.

Definition

Namespace: ProjectLCore.Players
Assembly: ProjectLCore (in ProjectLCore.dll) Version: 1.0.0+d0f5e2a7a5f4bb0431970f279d2f79d24b15d256
C#
public override Task<GameAction> GetActionAsync(
	GameStateGameInfo gameInfo,
	PlayerStatePlayerInfo[] playerInfos,
	TurnInfo turnInfo,
	ActionVerifier verifier,
	CancellationToken cancellationToken = default
)

Parameters

gameInfo  GameStateGameInfo
Information about the shared resources.
playerInfos  PlayerStatePlayerInfo
Information about the resources of the players.
turnInfo  TurnInfo
Information about the current turn.
verifier  ActionVerifier
Verifier for verifying the validity of actions in the current game context.
cancellationToken  CancellationToken  (Optional)
A cancellation token to observe while waiting for the task to complete.

Return Value

TaskGameAction
The action the player wants to take.

Exceptions

OperationCanceledExceptionThe task was canceled.

See Also