-/// line_to_san() takes a position and a line (an array of moves representing
-/// a sequence of legal moves from the position) as input, and returns a
-/// string containing the line in short algebraic notation. If the boolean
-/// parameter 'breakLines' is true, line breaks are inserted, with a line
-/// length of 80 characters. After a line break, 'startColumn' spaces are
-/// inserted at the beginning of the new line.
-
-const string line_to_san(const Position& pos, Move line[], int startColumn, bool breakLines) {
-
- StateInfo st;
- std::stringstream s;
- string moveStr;
- size_t length = 0;
- size_t maxLength = 80 - startColumn;
- Position p(pos, pos.thread());
-
- for (Move* m = line; *m != MOVE_NONE; m++)
- {
- moveStr = move_to_san(p, *m);
- length += moveStr.length() + 1;
- if (breakLines && length > maxLength)
- {
- s << "\n" << std::setw(startColumn) << " ";
- length = moveStr.length() + 1;
- }
- s << moveStr << ' ';
-
- if (*m == MOVE_NULL)
- p.do_null_move(st);
- else
- p.do_move(*m, st);
- }
- return s.str();
-}
-
-