Display the best move for low-depth.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Jul 2021 14:15:16 +0000 (16:15 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 18 Jul 2021 14:15:16 +0000 (16:15 +0200)
www/js/remoteglot.js

index b72f4c426119082512ba43af50bec53fe68a3019..a8c99c8edec484c609a4415d0997142674d68718 100644 (file)
@@ -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 += '<span class="depth">d' + lds[i][0] + ':</span> ' + lds[i][1];
+                       lowdepth += '<span class="depth">d' + lds[i][0] + ':</span> ' + lds[i][2] + ' ' + lds[i][1];
                        if (i != lds.length - 1) {
                                lowdepth += ', ';
                        }