From 6d612018059e2e69f3ac39657d667e438c83782d Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 2 Jan 2021 14:26:58 +0100 Subject: [PATCH] Small tweaks to TB-win messaging. --- www/js/remoteglot.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index e111bc6..db81656 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -7,7 +7,7 @@ * @type {Number} * @const * @private */ -var SCRIPT_VERSION = 2020122900; +var SCRIPT_VERSION = 2021010200; /** * The current backend URL. @@ -2150,9 +2150,17 @@ var format_long_score = function(score) { } if (score[0] === 'tb') { if (score[1] > 0) { - return "White wins in " + Math.ceil(score[1] / 2); + if (score[1] == 0) { + return "Won for white (tablebase)"; + } else { + return "White wins in " + Math.ceil(score[1] / 2); + } } else { - return "Black wins in " + Math.ceil(-score[1] / 2); + if (score[1] == -1) { + return "Won for black (tablebase)"; + } else { + return "Black wins in " + Math.ceil(-score[1] / 2); + } } } else if (score[0] === 'm') { if (score[1] > 0) { -- 2.39.2