dist-esnext/Game.js
function getTurnPieces(game) {
    const isBlack = isBlackTurn(game);
    return game.board.reduce((piecesRow, row) => {
        return piecesRow.concat(row.reduce((pieces, position) => (isBlack !== position.isBlack)
            ? pieces
            : pieces.concat({ x: position.x, y: position.y, isBlack }), []));
    }, []);
}
function getTurnPieces(game) {
    const isBlack = isBlackTurn(game);
    return game.board.reduce((piecesRow, row) => {
        return piecesRow.concat(row.reduce((pieces, position) => (isBlack !== position.isBlack)
            ? pieces
            : pieces.concat({ x: position.x, y: position.y, isBlack }), []));
    }, []);
}
function getTurnPieces ( game ) { const isBlack = isBlackTurn ( game ) ; return game . board . reduce ( ( piecesRow , row ) => { return piecesRow . concat ( row . reduce ( ( pieces , position ) => ( isBlack !== position . isBlack ) ? pieces : pieces . concat ( { x : position . x , y : position . y , isBlack } ) , [ ] ) ) ; } , [ ] ) ; }
Gets all positions from current player turn.
Gets all positions from current player turn .