Board

Board.Session.BoardSession

BoardSession.PresentReplacePlayerSelector Method

Overloads  
PresentReplacePlayerSelector(BoardSessionPlayer) Presents the native player selector to replace or remove an existing BoardSessionPlayer from the current session.
PresentReplacePlayerSelector(BoardSessionPlayer, int[]) Presents the native player selector to replace or remove an existing BoardSessionPlayer from the current session, with optional filtering of which AI types to show.

BoardSession.PresentReplacePlayerSelector(BoardSessionPlayer) Method

Presents the native player selector to replace or remove an existing BoardSessionPlayer from the current session.

public static System.Threading.Tasks.Task<bool> PresentReplacePlayerSelector(Board.Session.BoardSessionPlayer player);

Parameters

player BoardSessionPlayer

The BoardSessionPlayer in the current session to replace or remove.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that completes with true if the player was replaced; otherwise, false if the selector was dismissed.

Exceptions

System.ArgumentNullException
player is null.

System.InvalidOperationException
The native player selector failed to open.

Remarks

Any resulting changes to players will trigger the playersChanged event.

BoardSession.PresentReplacePlayerSelector(BoardSessionPlayer, int[]) Method

Presents the native player selector to replace or remove an existing BoardSessionPlayer from the current session, with optional filtering of which AI types to show.

public static System.Threading.Tasks.Task<bool> PresentReplacePlayerSelector(Board.Session.BoardSessionPlayer player, int[] aiTypeIndices);

Parameters

player BoardSessionPlayer

The BoardSessionPlayer in the current session to replace or remove.

aiTypeIndices System.Int32[]

Indices into the registered AI types to show, or null for all.

Returns

System.Threading.Tasks.Task<System.Boolean>
A task that completes with true if the player was replaced; otherwise, false if the selector was dismissed.

Exceptions

System.ArgumentNullException
player is null.

System.InvalidOperationException
The native player selector failed to open.

Remarks

Any resulting changes to players will trigger the playersChanged event. If aiTypeIndices is null, all registered AI types are shown. On older OS versions, AI types are not shown (graceful degradation).