public abstract class AIPlayerBase : Player
AIPlayerBase | Initializes a new instance of the AIPlayerBase class |
Id |
The unique ID of the player.
(Inherited from Player) |
Name |
The name of the player.
(Inherited from Player) |
GetAction(GameStateGameInfo, PlayerStatePlayerInfo, TurnInfo, ActionVerifier) | Passes the parameters to GetAction(GameStateGameInfo, PlayerStatePlayerInfo, ListPlayerStatePlayerInfo, TurnInfo, ActionVerifier) and returns the result. This method should be called only after InitAsync(Int32, ListPuzzle, String, CancellationToken) has been called and finished running. |
GetAction(GameStateGameInfo, PlayerStatePlayerInfo, ListPlayerStatePlayerInfo, TurnInfo, ActionVerifier) | Implementation of an algorithm that decides the action the player wants to take based on the current game context. |
GetActionAsync |
Asynchronously passes the parameters to GetAction(GameStateGameInfo, PlayerStatePlayerInfo, ListPlayerStatePlayerInfo, TurnInfo, ActionVerifier) and returns a Task containing the result.
(Overrides PlayerGetActionAsync(GameStateGameInfo, PlayerStatePlayerInfo, TurnInfo, ActionVerifier, CancellationToken)) |
GetReward | Implementation of an algorithm that decides the shape the player wants as a reward for completing a puzzle. |
GetRewardAsync |
Asynchronously passes the parameters to GetReward(ListTetrominoShape, Puzzle) and returns a Task containing the result.
Note that the player doesn't get the current game context here.
This is because this function will be called right after he completes a puzzle and therefore he knows the current game state from the last GetActionAsync(GameStateGameInfo, PlayerStatePlayerInfo, TurnInfo, ActionVerifier, CancellationToken) call.
(Overrides PlayerGetRewardAsync(ListTetrominoShape, Puzzle, CancellationToken)) |
Init | Function for initializing the AI player. This function is called once at the beginning of the game. |
InitAsync | 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. |