]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Print the name of the players.
[remoteglot] / www / js / remoteglot.js
index 1fd6c2365535cf3c6a67fc387220ea96725a03e1..936c336aa4492d68786ddf710915670baeb13ded 100644 (file)
@@ -264,7 +264,7 @@ var position_arrow = function(arrow) {
        head.setAttribute("xmlns", XHTML_NS);
        head.setAttribute("stroke", "#000");
        head.setAttribute("stroke-width", "1");
-       head.setAttribute("fill", "#f66");
+       head.setAttribute("fill", arrow.fg_color);
        svg.appendChild(head);
 
        $(svg).css({ top: pos.top, left: pos.left });
@@ -491,7 +491,13 @@ var update_board = function(data, num_viewers) {
        display_lines = [];
 
        // The headline.
-       var headline = 'Analysis';
+       var headline;
+       if (data['position']['player_w'] && data['position']['player_b']) {
+               headline = data['position']['player_w'] + '–' +
+                       data['position']['player_b'] + ', analysis';
+       } else {
+               headline = 'Analysis';
+       }
        if (data['position']['last_move'] !== 'none') {
                headline += ' after '
                if (data['position']['toplay'] == 'W') {
@@ -525,9 +531,9 @@ var update_board = function(data, num_viewers) {
                }
                if (data['tbhits'] && data['tbhits'] > 0) {
                        if (data['tbhits'] == 1) {
-                               stats += ', one Nalimov hit';
+                               stats += ', one Syzygy hit';
                        } else {
-                               stats += ', ' + data['tbhits'] + ' Nalimov hits';
+                               stats += ', ' + thousands(data['tbhits']) + ' Syzygy hits';
                        }
                }
 
@@ -649,7 +655,7 @@ var next_move = function() {
        ++current_display_move;
        update_displayed_line();
 }
-window['next_move'] = prev_move;
+window['next_move'] = next_move;
 
 var update_displayed_line = function() {
        if (current_display_line === null) {