Method FromMoveIndex
FromMoveIndex(int, BoardSize)
Construct a Move from its move index and the board size. This is useful for iterating through all the Moves on a board, or constructing the Move corresponding to an Agent decision.
Declaration
public static Move FromMoveIndex(int moveIndex, BoardSize maxBoardSize)
Parameters
| Type | Name | Description |
|---|---|---|
| int | moveIndex | Must be between 0 and NumPotentialMoves(maxRows, maxCols). |
| BoardSize | maxBoardSize |
Returns
| Type | Description |
|---|---|
| Move |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |