/**
 * Bishop.js - Bishop piece implementation
 * Handles diagonal movement
 */

import { Piece } from './Piece.js';

export class Bishop extends Piece {
    constructor(color, position) {
        super(color, position);
        this.type = 'bishop';
    }

    /**
     * Get valid moves for bishop
     * Bishop moves diagonally any number of squares
     * @param {Board} board - Game board
     * @returns {Position[]} Array of valid positions
     */
    getValidMoves(board) {
        // Diagonal directions
        const directions = [
            [-1, -1], // Up-left
            [-1, 1],  // Up-right
            [1, -1],  // Down-left
            [1, 1]    // Down-right
        ];

        return this.getSlidingMoves(board, directions);
    }
}
