From 7d2173393e1e9a0e6bbb654a1a87a834da8cbcb7 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 18 Jul 2021 16:15:16 +0200 Subject: [PATCH] Display the best move for low-depth. --- www/js/remoteglot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index b72f4c4..a8c99c8 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1219,11 +1219,12 @@ var update_board = function() { lowdepth = 'Quick look: '; var lds = []; Object.keys(data['lowdepth']).forEach(function(depth) { - lds.push([parseInt(depth), format_short_score(data['lowdepth'][depth])]); + let info = data['lowdepth'][depth]; + lds.push([parseInt(depth), format_short_score(info.slice(0,-1)), info[info.length - 1]]); }); lds.sort(function(a, b) { return a[0] - b[0]; }); for (var i = 0; i < lds.length; ++i) { - lowdepth += 'd' + lds[i][0] + ': ' + lds[i][1]; + lowdepth += 'd' + lds[i][0] + ': ' + lds[i][2] + ' ' + lds[i][1]; if (i != lds.length - 1) { lowdepth += ', '; } -- 2.39.2