if (opt_limit && opt_showlast && pv.length > opt_limit) {
// Truncate the PV at the beginning (instead of at the end).
// We assume here that toplay is 'W'. We also assume that if
// opt_showlast is set, then it is the history, and thus,
// the UI should be to expand the history.
ret.appendChild(document.createTextNode('('));
if (opt_limit && opt_showlast && pv.length > opt_limit) {
// Truncate the PV at the beginning (instead of at the end).
// We assume here that toplay is 'W'. We also assume that if
// opt_showlast is set, then it is the history, and thus,
// the UI should be to expand the history.
ret.appendChild(document.createTextNode('('));
} else if (toplay == 'B' && pv.length > 0) {
ret.appendChild(document.createTextNode(move_num + '. … '));
}
} else if (toplay == 'B' && pv.length > 0) {
ret.appendChild(document.createTextNode(move_num + '. … '));
}
link.className = 'move';
link.setAttribute('id', 'automove' + line_num + '-' + i);
link.textContent = pv[i];
link.className = 'move';
link.setAttribute('id', 'automove' + line_num + '-' + i);
link.textContent = pv[i];