Fix display of splice points and tablebase wins after the last changes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 11 Feb 2021 22:16:55 +0000 (23:16 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 11 Feb 2021 22:16:55 +0000 (23:16 +0100)
www/js/remoteglot.js

index 4045bb54f7cdce2306d43d138f741c2cae5c71d9..353d7b14b7dc6136b6650c8390b5a5e7ed94852c 100644 (file)
@@ -664,8 +664,8 @@ var add_pv = function(start_fen, pv, move_num, toplay, scores, start_display_mov
        if (scores !== null && scores.length >= 1 &&
            scores[scores.length - 1].score !== undefined &&
            scores[scores.length - 1].score !== null &&
-           scores[scores.length - 1].score[0] === "tb") {
-               splicepos = Math.abs(scores[scores.length - 1].score[1]);
+           scores[scores.length - 1].score[0] === 'T') {
+               splicepos = scores[scores.length - 1].score[1];
        }
        return print_pv(display_lines.length - 1, splicepos, opt_limit, opt_showlast);
 }
@@ -2158,7 +2158,7 @@ var format_long_score = function(score) {
                if (score[1] == 0) {
                        return "Won for white (tablebase)";
                } else {
-                       return "White wins in " + Math.ceil(score[1]);
+                       return "White wins in " + Math.ceil(score[1] / 2);
                }
        } else if (score[0] === 't') {
                if (score[1] == -1) {