From 2cdf1aaa58d842342c91104edc53074a061df20b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 21 Nov 2013 23:27:58 +0100 Subject: [PATCH] Fix some move number display issues. Argh. --- www/js/remoteglot.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index c0a194d..7bd7e16 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -285,8 +285,8 @@ var print_pv = function(fen, uci_pv, pretty_pv, move_num, toplay, limit) { pv = move_num + '. … ' + move; toplay = 'W'; ++i; + ++move_num; } - ++move_num; for ( ; i < pretty_pv.length; ++i) { var move = "" + pretty_pv[i] + ""; @@ -379,9 +379,11 @@ var update_board = function(board, data, num_viewers) { // The headline. var headline = 'Analysis'; if (data.position.last_move !== 'none') { - headline += ' after ' + data.position.move_num + '. '; + headline += ' after ' if (data.position.toplay == 'W') { - headline += '… '; + headline += (data.position.move_num-1) + '… '; + } else { + headline += data.position.move_num + '. '; } headline += data.position.last_move; } -- 2.39.2