]> git.sesse.net Git - remoteglot/commitdiff
Show low-depth scores.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 16 Jul 2021 14:54:01 +0000 (16:54 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 16 Jul 2021 14:54:01 +0000 (16:54 +0200)
www/css/remoteglot.css
www/index.html
www/js/remoteglot.js

index fcd6e5759fd3bbbe5393a3e4e2454b7ab74e7601..e0f9444138a83842253f5b7ff9b10faaae9028c8 100644 (file)
@@ -24,6 +24,10 @@ h3 {
        margin-left: 0.5em;
        margin-right: 0.5em;
 }
        margin-left: 0.5em;
        margin-right: 0.5em;
 }
+#lowdepthcontainer {
+       font-size: x-small;
+       margin-top: 0;
+}
 #pvcontainer {
        clear: left;
        margin-top: 1em;
 #pvcontainer {
        clear: left;
        margin-top: 1em;
@@ -198,7 +202,7 @@ a.move:hover {
        border-right: none;
 }
 
        border-right: none;
 }
 
-.pv, #pv, #history {  /* Mute move colors a bit. */
+.pv, #pv, #history, #lowdepth .depth {  /* Mute move colors a bit. */
        color: #555;
 }
 
        color: #555;
 }
 
index 5158266e2af5c55271336dca49110feeac8356aa..c8022199c78aeff9fcec3b52d9c366cd62c9fd31 100644 (file)
@@ -32,6 +32,9 @@
       <span id="scorespark"></span>
     </div>
   </div>
       <span id="scorespark"></span>
     </div>
   </div>
+  <div id="lowdepthcontainer">
+    <span id="lowdepth"></span>
+  </div>
   <p id="pvcontainer"><strong id="pvtitle">PV:</strong> <span id="pv"></span></p>
   <p id="searchstats"></p>
   <h3>History and potential moves (multi-PV)</h3>
   <p id="pvcontainer"><strong id="pvtitle">PV:</strong> <span id="pv"></span></p>
   <p id="searchstats"></p>
   <h3>History and potential moves (multi-PV)</h3>
index 37f5c7bd1b61a034e56e9471fc4cd74f074be7ce..b72f4c426119082512ba43af50bec53fe68a3019 100644 (file)
@@ -1213,6 +1213,24 @@ var update_board = function() {
                $("#score").text(format_long_score(data['score']));
        }
 
                $("#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 += '<span class="depth">d' + lds[i][0] + ':</span> ' + lds[i][1];
+                       if (i != lds.length - 1) {
+                               lowdepth += ', ';
+                       }
+               }
+       }
+       $("#lowdepth").html(lowdepth);
+
        // The search stats.
        if (data['searchstats']) {
                $("#searchstats").html(data['searchstats']);
        // The search stats.
        if (data['searchstats']) {
                $("#searchstats").html(data['searchstats']);