AIPlayerBaseInitAsync Method

Asynchronously passes the parameters to Init(Int32, ListPuzzle, String) and initializes the player. This method should be called once at the beginning of the game.

Definition

Namespace: ProjectLCore.Players
Assembly: ProjectLCore (in ProjectLCore.dll) Version: 1.0.0+d0f5e2a7a5f4bb0431970f279d2f79d24b15d256
C#
public Task InitAsync(
	int numPlayers,
	List<Puzzle> allPuzzles,
	string? filePath = null,
	CancellationToken cancellationToken = default
)

Parameters

numPlayers  Int32
The number of players in the game.
allPuzzles  ListPuzzle
All the puzzles in the game.
filePath  String  (Optional)
The path to a file where the player might be storing some information.
cancellationToken  CancellationToken  (Optional)
A cancellation token to observe while waiting for the task to complete.

Return Value

Task
A task that represents the asynchronous operation.

Exceptions

OperationCanceledExceptionThe task was canceled.

See Also