X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=27ded16052cb45076f37b00534f1f448f20bfdfc;hb=a8f854462950e88d74aa73102ff3d431caa52b0e;hp=ee2432494a50ddc09af28940442579add471bac6;hpb=83e18ba0a5a3b1c69af5f6a9842b2006f6a9c7e3;p=remoteglot 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; }