X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fbase_rules.js;h=53001f6373a279f9272876b7e36f09be9746ad8a;hb=5246b49d18b711fb26ee27919ab392be24b80fba;hp=734af025a31e4fb9e09171fc7df4263200a631b7;hpb=af34341d92d47d14f396e7f4adb81f2a7e9d9a61;p=vchess.git diff --git a/client/src/base_rules.js b/client/src/base_rules.js index 734af025..53001f63 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -80,6 +80,11 @@ export const ChessRules = class ChessRules { return V.ShowMoves; } + // Used for Monochrome variant (TODO: harmonize: !canFlip ==> showFirstTurn) + get showFirstTurn() { + return false; + } + // Some variants always show the same orientation static get CanFlip() { return true; @@ -990,7 +995,7 @@ export const ChessRules = class ChessRules { const color = this.turn; for (let i = 0; i < V.size.x; i++) { for (let j = 0; j < V.size.y; j++) { - if (this.getColor(i, j) == color) { + if (this.board[i][j] != V.EMPTY && this.getColor(i, j) == color) { const moves = this.getPotentialMovesFrom([i, j]); if (moves.length > 0) { for (let k = 0; k < moves.length; k++) {