Companion

object Companion

Object containing the methods for moving the tiles in the puzzle grid.

Functions

canMoveDown
Link copied to clipboard
private fun canMoveDown(position: Int, blankTilePos: Int, numColumns: Int): Boolean
Checks if the given tile can be moved down.
canMoveLeft
Link copied to clipboard
private fun canMoveLeft(position: Int, blankTilePos: Int, numColumns: Int): Boolean
Checks if the given tile can be moved to the left.
canMoveRight
Link copied to clipboard
private fun canMoveRight(position: Int, blankTilePos: Int, numColumns: Int): Boolean
Checks if the given tile can be moved to the right.
canMoveTile
Link copied to clipboard
fun canMoveTile(direction: FlingDirection, position: Int, blankTilePos: Int, numColumns: Int): Boolean
Checks if the given tile can be moved in the specified direction.
canMoveUp
Link copied to clipboard
private fun canMoveUp(position: Int, blankTilePos: Int, numColumns: Int): Boolean
Checks if the given tile can be moved up.
isLeftEdgeTile
Link copied to clipboard
private fun isLeftEdgeTile(position: Int, numColumns: Int): Boolean
Checks if the given tile is located on the first column of the puzzle grid.
isRightEdgeTile
Link copied to clipboard
private fun isRightEdgeTile(position: Int, numColumns: Int): Boolean
Checks if the given tile is located on the last column of the puzzle grid.