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 274490f..8fe1297 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 dfd16fd..bb34806 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;