public override string ToString() { var str = string.Empty; var c = char.ToUpper(MovedPiece.GetFenChar()); if (c != 'P') { str += c; } var nX = NewField.X; var nY = NewField.Y; var oX = OldField.X; str += c.Load(nX); str += (nY + 1); if (Mate) { str += "#"; return(str); } if (Check) { str += "+"; return(str); } return(str); }
protected string GetPieceNotation() { var startingFile = MoveUtilities.GetFileFromInt(StartingSquare.Coordinate.File); return(MovedPiece is Pawn && IsCapture ? startingFile : MovedPiece.GetNotation()); }
private string GetPromotionNotation() { return("=" + MovedPiece.GetNotation()); }
protected virtual void OnMovePlayed() { MovedPiece.OnPieceMoved(EndingSquare); CapturedPiece?.OnPieceCaptured(); }