From f71f5c94d093acda1b39d23cf7a71a21c6a3122b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 16 Jul 2021 16:54:01 +0200 Subject: [PATCH] Show low-depth scores. --- www/css/remoteglot.css | 6 +++++- www/index.html | 3 +++ www/js/remoteglot.js | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/www/css/remoteglot.css b/www/css/remoteglot.css index fcd6e57..e0f9444 100644 --- a/www/css/remoteglot.css +++ b/www/css/remoteglot.css @@ -24,6 +24,10 @@ h3 { margin-left: 0.5em; margin-right: 0.5em; } +#lowdepthcontainer { + font-size: x-small; + margin-top: 0; +} #pvcontainer { clear: left; margin-top: 1em; @@ -198,7 +202,7 @@ a.move:hover { border-right: none; } -.pv, #pv, #history { /* Mute move colors a bit. */ +.pv, #pv, #history, #lowdepth .depth { /* Mute move colors a bit. */ color: #555; } diff --git a/www/index.html b/www/index.html index 5158266..c802219 100644 --- a/www/index.html +++ b/www/index.html @@ -32,6 +32,9 @@ +
+ +

PV:

History and potential moves (multi-PV)

diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 37f5c7b..b72f4c4 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1213,6 +1213,24 @@ var update_board = function() { $("#score").text(format_long_score(data['score'])); } + // Low depth. + var lowdepth = ''; + if (data['lowdepth']) { + lowdepth = 'Quick look: '; + var lds = []; + Object.keys(data['lowdepth']).forEach(function(depth) { + lds.push([parseInt(depth), format_short_score(data['lowdepth'][depth])]); + }); + 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]; + if (i != lds.length - 1) { + lowdepth += ', '; + } + } + } + $("#lowdepth").html(lowdepth); + // The search stats. if (data['searchstats']) { $("#searchstats").html(data['searchstats']); -- 2.39.2