Yet more Chess960 castling fixes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 10 Feb 2018 17:08:09 +0000 (18:08 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 10 Feb 2018 17:08:09 +0000 (18:08 +0100)
www/js/chess.js

index 9da372c..a0e3813 100644 (file)
@@ -1104,7 +1104,7 @@ var Chess = function(fen) {
         castling_from = move.to + 1;
       }
 
-      board[castling_to] = board[castling_from];
+      board[castling_to] = {type: ROOK, color: us};
       if(castling_from !== move.from && castling_from !== castling_to)
         board[castling_from] = null;
     }