From e30523f27d5989903de6743a8b4f194a390d576c Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Fri, 4 Jun 2021 01:28:46 +0200
Subject: [PATCH] loseOnRepetition: getter seems enough

---
 client/src/variants/Pandemonium2.js | 2 +-
 client/src/variants/Shogi.js        | 2 +-
 client/src/views/Game.vue           | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/src/variants/Pandemonium2.js b/client/src/variants/Pandemonium2.js
index 4a980832..2af56ea5 100644
--- a/client/src/variants/Pandemonium2.js
+++ b/client/src/variants/Pandemonium2.js
@@ -12,7 +12,7 @@ export class Pandemonium2Rules extends ChessRules {
     );
   }
 
-  loseOnRepetition() {
+  get loseOnRepetition() {
     // If current side is under check: lost
     return this.underCheck(this.turn);
   }
diff --git a/client/src/variants/Shogi.js b/client/src/variants/Shogi.js
index 9806351c..95be2d1b 100644
--- a/client/src/variants/Shogi.js
+++ b/client/src/variants/Shogi.js
@@ -24,7 +24,7 @@ export class ShogiRules extends ChessRules {
     return true;
   }
 
-  loseOnRepetition() {
+  get loseOnRepetition() {
     // If current side is under check: lost
     return this.underCheck(this.turn);
   }
diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue
index 1071ece8..11a59258 100644
--- a/client/src/views/Game.vue
+++ b/client/src/views/Game.vue
@@ -1447,7 +1447,7 @@ export default {
               ? this.repeat[fenObj] + 1
               : 1;
           if (this.repeat[fenObj] >= 3) {
-            if (this.vr.loseOnRepetition())
+            if (this.vr.loseOnRepetition)
               this.gameOver(moveCol == "w" ? "0-1" : "1-0", "Repetition");
             else this.drawOffer = "threerep";
           }
-- 
2.44.0