public void MoveToString(Move move, StringBuilder output) { if (!_chess960 && !move.IsCastlelingMove()) { output.Append(move.ToString()); } else { if (_xfen && move.GetToSquare() == ECastleling.Long.GetKingCastleTo(move.GetMovingSide())) { output.Append(ECastleling.Long.GetCastlelingString()); } else if (_xfen) { output.Append(ECastleling.Short.GetCastlelingString()); } else { output.Append(move.GetFromSquare().ToString()); output.Append(Position.GetRookCastleFrom(move.GetToSquare()).ToString()); } } }