ShuffleRunnable

fun ShuffleRunnable(handler: Handler, tilePosition: Int, numTiles: Int)

Creates a runnable class related to shuffling the puzzle tiles.

Parameters

handler

Allows sending and processing Message and Runnable objects associated with a thread's MessageQueue.

tilePosition

Position of the tile (zero-based, following row-major order).

numTiles

Number of tiles in the puzzle grid.