getChildNodes

private fun getChildNodes(node: Node, blankTilePos: Int, numColumns: Int, blankTileMarker: Int): ArrayList<Node>

Gets the child nodes of the given node.

The positions pertained to by these child nodes are adjacent to the position pertained to by the given node.

Return

Child nodes of the given node.

Parameters

node

Current node.

blankTilePos

Position of the blank tile in the puzzle grid (zero-based, following row-major order).

numColumns

Number of columns in the puzzle grid.

blankTileMarker

Indicator that the tile is blank.