generateSlidingMoves

fun generateSlidingMoves(piece: Piece, fromSquare: Square, board: Board, directions: List<Offset>): List<Move>

Generates all pseudo-legal sliding moves for a piece in the given directions.

Return

List of possible moves for the sliding piece.

Parameters

piece

The sliding piece.

fromSquare

The square the piece is moving from.

board

The current board state.

directions

List of direction offsets to slide in.