X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=d259e272f9d9229a95e11a8bc2ac53a12835846e;hp=80a5db9d9bb9696961c94002f90213ec24b077c0;hb=7d32d14ab6626993cc72c1d3cebc40f13e95dbed;hpb=33bc30f3fd0026d8fae3107b5154bbc03f5f8673 diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 80a5db9..d259e27 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -261,7 +261,7 @@ var find_nonstupid_moves = function(data, margin) { moves.push(move); } } - moves = moves.sort(function(a, b) { return compare_by_score(data.refutation_lines, a, b) }); + moves = moves.sort(function(a, b) { return compare_by_score(data.refutation_lines, data.position.toplay, a, b) }); moves.unshift(data.pv_uci[0]); return moves;