var td = document.createElement("td");
tr.appendChild(td);
$(td).addClass("move");
+ if (line[j] !== undefined) {
+ if (history.length % 2 == 0) {
+ $(td).text(((history.length / 2) + 1) + ". ");
+ } else {
+ $(td).text(((history.length / 2) + 0.5) + ". …");
+ }
+ }
+
var move_a = document.createElement("a");
move_a.href = "javascript:make_move('" + line[j] + "')";
td.appendChild(move_a);