From: Steinar H. Gunderson Date: Tue, 27 Dec 2022 17:05:02 +0000 (+0100) Subject: Remove depth_secondary_key, which was off for 5+ years without anyone noticing. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=a8f854462950e88d74aa73102ff3d431caa52b0e Remove depth_secondary_key, which was off for 5+ years without anyone noticing. --- diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index ee24324..27ded16 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -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; }