]> git.sesse.net Git - remoteglot/commitdiff
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 9da372c9d920526f9802dc8fa63a9c0bed97c35f..a0e3813c8e4ceea1e5c9d4c7cd0c78dacacdeb08 100644 (file)
@@ -1104,7 +1104,7 @@ var Chess = function(fen) {
         castling_from = move.to + 1;
       }
 
         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;
     }
       if(castling_from !== move.from && castling_from !== castling_to)
         board[castling_from] = null;
     }