]> git.sesse.net Git - remoteglot/commitdiff
Unbreak find_nonstupid_moves.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Nov 2013 22:13:45 +0000 (23:13 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Nov 2013 22:13:45 +0000 (23:13 +0100)
www/js/remoteglot.js

index 80a5db9d9bb9696961c94002f90213ec24b077c0..d259e272f9d9229a95e11a8bc2ac53a12835846e 100644 (file)
@@ -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;