function schach(sol) { solution = sol.split('|'); n = solution.length; html = '
'; for (col = 0; col < n; col++) html += ' | ' + (col + 1) + ' | '; html += '|
---|---|---|
' + (row + 1) + ' | '; color = row % 2; for (col = 0; col < n; col++) { html += (col % 2) == color ? '' : ' | ';
if (col == solution[row] -1)
html += '![]() | ';
}
html += '