UNPKG

chess-legal-moves

Version:

Analyses a given chess game position in Fen notation to return legal moves and provides the next game position after a given move

13 lines (12 loc) 599 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bishopsMoves = void 0; var generateSlidingPieceScope_1 = require("./rayAttacks/generateSlidingPieceScope"); var generatePieceMoves_1 = require("./generatePieceMoves"); function bishopsMoves(board, hasToPlay) { // @TODO document var bishopScope = (0, generateSlidingPieceScope_1.generateSlidingPieceScope)(board, 'bishop', hasToPlay); var bishopsMovesList = (0, generatePieceMoves_1.generatePieceMoves)(bishopScope, board, hasToPlay); return bishopsMovesList; } exports.bishopsMoves = bishopsMoves;