public void MovePiece(ChessPiece piece, string algebraicPosition) { byte rowIndex = ChessPGN.UNKNOWN_INDEX; byte colIndex = ChessPGN.UNKNOWN_INDEX; ChessPGN.AlgebraicPositionToIndexes(algebraicPosition, ref rowIndex, ref colIndex); MovePiece(piece, rowIndex, colIndex); }
/// <summary> /// When we Refers to cells by an algebraic position, the indexes are 1-based /// </summary> /// <param name="algebraicPosition"></param> /// <returns></returns> public ChessBoardCell this[string algebraicPosition] { get { byte row = 0; byte column = 0; ChessPGN.AlgebraicPositionToIndexes(algebraicPosition, ref row, ref column); if (row != ChessPGN.UNKNOWN_INDEX && column != ChessPGN.UNKNOWN_INDEX) { return(boardCells[row, column]); } else { return(null); } } }
public void MovePiece(string pgnMove) { ChessMove move = ChessPGN.GetMoveFromPGN(pgnMove, this, Game.Board); RequestMovement(move); }
public static ChessMove CreateStandardChessMove(string PGNNotationMove, ChessPlayer player, ChessBoard board) { return(ChessPGN.GetMoveFromPGN(PGNNotationMove, player, board)); }
public override string ToString() { return(string.Format("{0}", ChessPGN.GetPGNNameForPiece(PieceType, false))); }