import Board from '../Board'; import { Direction, DirectionAngle } from '../Direction'; import Player from '../Player'; import Tile from '../Tile'; export declare class Piece { tile: Tile; captured: boolean; isWhite: boolean; hasMoved: boolean; /** * @param {Tile} tile this this.tile of the piece. * @param {boolean} captured the captured status of the peice. * @param {boolean} isWhite is the piece white or black. * @param {boolean} hasMoves has the piece moved or not. */ constructor(tile: Tile, captured?: boolean, isWhite?: boolean, hasMoved?: boolean); /** * Static method in turn of copy constructor. * @param {Piece} piece the peice to make a copy of. */ static fromPiece: (piece: Piece) => Piece; /** * Determine if a tiles peice is in the board * @param {Board} board the board of the peice */ inBoard: (board: Board) => boolean; /** * @param {Direction} dir the direction to generate moves in * @param {Player} currentPlayer The player who's legal moves this function will return. * @param {Player} enemyPlayer this player is required to calculate legal moves for the currentPlayer * @param {Board} board the board that the two players exist in. * @return {Tile[]} returns an array of legal moves. */ genMovesLin: (dir: Direction, currentPlayer: Player, enemyPlayer: Player, board: Board) => Tile[]; /** * @param {DirectionAngle} dir the direction to generate moves in * @param {Player} currentPlayer The player who's legal moves this function will return. * @param {Player} enemyPlayer this player is required to calculate legal moves for the currentPlayer * @param {Board} board the board that the two players exist in. * @return {Array} returns an array of legal moves. */ genMovesAng: (dir: DirectionAngle, currentPlayer: Player, enemyPlayer: Player, board: Board) => Tile[]; /** * check to see if a move is infact a legal move. * @param {Player} currentPlayer * @param {Player} enemyPlayer * @param {Board} board * @param {Tile} oldtile * @param {Tile} tile */ isLegalMove(oldtile: Tile, tile: Tile, currentPlayer: Player, enemyPlayer: Player, board: Board): boolean; }