X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=db816564829ca7a293be77c4ecc623cdccb89a2f;hb=6d612018059e2e69f3ac39657d667e438c83782d;hp=e111bc6d8a817cfb4f5aab0eb2a4a66878f971b1;hpb=9dbe80127346dce1003c423a118321a3eb1a0b59;p=remoteglot 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) {