From: Benjamin Auder Date: Sat, 30 Jan 2021 22:22:26 +0000 (+0100) Subject: Fix Dark Chess: always can castle X-Git-Url: https://git.auder.net/%7B%7B%20asset%28%27mixstore/css/user/current/pieces/%7B%7B%20pkg.url%20%7D%7D?a=commitdiff_plain;h=9aec0ce61bfa527b58256370994cb57983461940;p=vchess.git Fix Dark Chess: always can castle --- diff --git a/client/src/variants/Dark.js b/client/src/variants/Dark.js index fd6d5719..e7ba40ce 100644 --- a/client/src/variants/Dark.js +++ b/client/src/variants/Dark.js @@ -83,6 +83,11 @@ export class DarkRules extends ChessRules { } } + // To always allow castling: + isAttacked() { + return false; + } + filterValid(moves) { // Used in the interface return moves;