X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=65d46460758f23aabd7014b243b95cdd88a7ec11;hp=6aea261ea3608b75e32df253dff84fe10e90b24e;hb=f0a812b7b11bc2a1514d2aa10ecc257d10d988d5;hpb=741a30d5edb2b4b06e3caa3a6c235c230f9ac71a diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 6aea261e..65d46460 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -1406,18 +1406,20 @@ export default { // In corr games, just reset clock to mainTime: this.game.clocks[colorIdx] = extractTime(this.game.cadence).mainTime; } - // If repetition detected, consider that a draw offer was received: - const fenObj = this.vr.getFenForRepeat(); - this.repeat[fenObj] = - !!this.repeat[fenObj] - ? this.repeat[fenObj] + 1 - : 1; - if (this.repeat[fenObj] >= 3) { - if (V.LoseOnRepetition) - this.gameOver(moveCol == "w" ? "0-1" : "1-0", "Repetition"); - else this.drawOffer = "threerep"; + if (!V.IgnoreRepetition) { + // If repetition detected, consider that a draw offer was received: + const fenObj = this.vr.getFenForRepeat(); + this.repeat[fenObj] = + !!this.repeat[fenObj] + ? this.repeat[fenObj] + 1 + : 1; + if (this.repeat[fenObj] >= 3) { + if (V.LoseOnRepetition) + this.gameOver(moveCol == "w" ? "0-1" : "1-0", "Repetition"); + else this.drawOffer = "threerep"; + } + else if (this.drawOffer == "threerep") this.drawOffer = ""; } - else if (this.drawOffer == "threerep") this.drawOffer = ""; if (!!this.game.mycolor && !data.receiveMyMove) { // NOTE: 'var' to see that variable outside this block var filtered_move = getFilteredMove(move);