X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=e0353e8f8a5f29b1917dd9b93982227fdc3bd22b;hb=7f09058f5c400e3bcf74431d185ed82d16011f12;hp=95a90cf73000683f3956dab5477de6404ec5814d;hpb=15d6904394c63102e7865b5537eb3b533e3ac06f;p=vchess.git diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 95a90cf7..e0353e8f 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -80,6 +80,14 @@ export const ChessRules = class ChessRules { return V.ShowMoves; } + // Sometimes moves must remain hidden until game ends + static get SomeHiddenMoves() { + return false; + } + get someHiddenMoves() { + return V.SomeHiddenMoves; + } + // Generally true, unless the variant includes random effects static get CorrConfirm() { return true; @@ -909,6 +917,7 @@ export const ChessRules = class ChessRules { if ( // NOTE: "castling" arg is used by some variants (Monster), // where "isAttacked" is overloaded in an infinite-recursive way. + // TODO: not used anymore (Monster + Doublemove2 are simplified). (!castleInCheck && this.isAttacked([x, i], oppCol, "castling")) || (this.board[x][i] != V.EMPTY && // NOTE: next check is enough, because of chessboard constraints