]> git.sesse.net Git - remoteglot/commitdiff
Remove depth_secondary_key, which was off for 5+ years without anyone noticing.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 27 Dec 2022 17:05:02 +0000 (18:05 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 27 Dec 2022 17:05:02 +0000 (18:05 +0100)
www/js/remoteglot.js

index ee2432494a50ddc09af28940442579add471bac6..27ded16052cb45076f37b00534f1f448f20bfdfc 100644 (file)
@@ -630,7 +630,7 @@ let find_nonstupid_moves = function(data, margin, invert) {
        let pv_score = undefined;
        for (let move in data['refutation_lines']) {
                let line = data['refutation_lines'][move];
-               let score = compute_score_sort_key(line['score'], line['depth'], invert, false);
+               let score = compute_score_sort_key(line['score'], line['depth'], invert);
                if (move == data['pv'][0]) {
                        pv_score = score;
                }
@@ -2347,10 +2347,9 @@ let compute_plot_score = function(score) {
  * @param score The score digest tuple.
  * @param {?number} depth Depth the move has been computed to, or null.
  * @param {boolean} invert Whether black is to play.
- * @param {boolean=} depth_secondary_key
  * @return {number}
  */
-let compute_score_sort_key = function(score, depth, invert, depth_secondary_key) {
+let compute_score_sort_key = function(score, depth, invert) {
        let s;
        if (!score) {
                return -10000000;
@@ -2374,11 +2373,7 @@ let compute_score_sort_key = function(score, depth, invert, depth_secondary_key)
        }
        if (s) {
                if (invert) s = -s;
-               if (depth_secondary_key) {
-                       return s * 200 + (depth || 0);
-               } else {
-                       return s;
-               }
+               return s;
        } else {
                return null;
        }