import Board from './Board'; import { Bishop, King, Knight, Pawn, Queen, Rook } from './Pieces'; import Tile from './Tile'; export default class Player { isWhite: boolean; rooks: Rook[]; king: King; queen: Queen; bishops: Bishop[]; knights: Knight[]; ct: number; playerName: string; pawns: Pawn[]; promotions: (Rook | King | Queen | Knight | Pawn | Bishop)[]; /** * @param {Boolean} isWhite determines if the player is white or black. * @param {String} playerName the name of the player. */ constructor(isWhite?: boolean, playerName?: string); /** * Static method in turn of copy constructor. * @param {Player} player the peice to make a copy of. */ static fromPlayer(player: Player): Player; /** * Move a piece from one tile to another. * @param {Tile} currentTile the tile where the piece is at. * @param {Tile} newTile the tile where the pieuce is being moved to. * @param {Player} enemyPlayer the enemy player. * @param {Board} board the board the peice is playing on. * @returns {boolean} returns true if a piece was moved, returns false if the piece couldn't move */ movePiece(currentTile: Tile, newTile: Tile, enemyPlayer: Player, board: Board): boolean; /** * @param {Player} player */ removeEnpassant(player: Player): void; /** * Find the peice at a current tile location * @param {Tile} tile the tile where the piece is being moved to. * @returns {Piece} */ piecePresent(tile: Tile): boolean; /** * Find the peice at a current tile location * @param {Tile} tile the tile where the piece is being moved to. * @returns {boolean} */ getPieceByTile(tile: Tile): Pawn | Rook | King | Queen | Bishop | Knight | null; }