]> git.sesse.net Git - remoteglot/commitdiff
Add a SCORE_NONE, and fix a typo.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Mar 2016 23:13:21 +0000 (00:13 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Mar 2016 23:13:21 +0000 (00:13 +0100)
www/js/hash-lookup.js
www/js/hashprobe.proto

index 274490f101327ca75f2fadd491517f6c4a68438d..8fe12970bb0e5ac5f75dc8b730a3a6586fa0d882 100644 (file)
@@ -90,7 +90,7 @@ var translate_line = function(board, fen, line) {
        var score = null;
        if (line['value']['score_type'] === 'SCORE_CP') {
                score = ['cp', line['value']['score_cp']];
-       } else if (line['value']['score_mate'] === 'SCORE_MATE') {
+       } else if (line['value']['score_type'] === 'SCORE_MATE') {
                score = ['m', line['value']['score_mate']];
        }
        if (score) {
index dfd16fdcd3dcfbd4bcdc75799449d6cce69c48af..bb34806dfdc53a3a13fdbe5e679d34b987011231 100644 (file)
@@ -33,8 +33,9 @@ message HashProbeMove {
 }
 message HashProbeScore {
        enum ScoreType {
-               SCORE_CP = 0;
-               SCORE_MATE = 1;
+               SCORE_NONE = 0;
+               SCORE_CP = 1;
+               SCORE_MATE = 2;
        }
        ScoreType score_type = 1;
        int32 score_cp = 2;