X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=41ebc140f48ade31b262e30e6b7017879047efb1;hb=ee3070443a7db2d5702a3a13f234b9af3b360c11;hp=33b0fc9022f6f4a585af32d3d3f534c36f6139e8;hpb=9842aca264cf81695a253820ef1efd8e677e1a20;p=vchess.git diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 33b0fc90..41ebc140 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -1034,13 +1034,13 @@ export const ChessRules = class ChessRules { move.start.x == firstRank && //our rook moves? this.INIT_COL_ROOK[c].includes(move.start.y) ) { - const flagIdx = move.start.y == this.INIT_COL_ROOK[c][0] ? 0 : 1; + const flagIdx = (move.start.y == this.INIT_COL_ROOK[c][0] ? 0 : 1); this.castleFlags[c][flagIdx] = false; } else if ( move.end.x == oppFirstRank && //we took opponent rook? this.INIT_COL_ROOK[oppCol].includes(move.end.y) ) { - const flagIdx = move.end.y == this.INIT_COL_ROOK[oppCol][0] ? 0 : 1; + const flagIdx = (move.end.y == this.INIT_COL_ROOK[oppCol][0] ? 0 : 1); this.castleFlags[oppCol][flagIdx] = false; } }