X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=9ee506e50c312ef56c738bf2091a2513b5930c9b;hp=d219f78ab6c470b16ce7dfa8e5ce912b86e5721a;hb=a9e1202b681d9d2f814767180183a0b04c58f8ab;hpb=f60aaac95dde260bbf897afee957406281068755 diff --git a/client/src/base_rules.js b/client/src/base_rules.js index d219f78a..9ee506e5 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -1169,8 +1169,8 @@ export const ChessRules = class ChessRules { this.postPlay(move); } - updateCastleFlags(move, piece) { - const c = V.GetOppCol(this.turn); + updateCastleFlags(move, piece, color) { + const c = color || V.GetOppCol(this.turn); const firstRank = (c == "w" ? V.size.x - 1 : 0); // Update castling flags if rooks are moved const oppCol = this.turn;