From c98f15e70fdf7c20ae4f17b54fee8a5736c7ce13 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Sun, 17 May 2020 23:18:44 +0200
Subject: [PATCH] Fix Dice variant (getFen() appeared twice)

---
 client/src/variants/Dice.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/client/src/variants/Dice.js b/client/src/variants/Dice.js
index 1b84be42..682b8d50 100644
--- a/client/src/variants/Dice.js
+++ b/client/src/variants/Dice.js
@@ -25,7 +25,7 @@ export class DiceRules extends ChessRules {
     return super.getFen() + " " + this.getToplayFen();
   }
 
-  getFen() {
+  getFenForRepeat() {
     return super.getFenForRepeat() + "_" + this.getToplayFen();
   }
 
@@ -135,7 +135,7 @@ export class DiceRules extends ChessRules {
       V.PlayOnBoard(this.board, m);
       const [piece, square] = this.getRandPiece(oppCol);
       m.start.toplay = square;
-      m.end.piece = piece;
+      m.end.p = piece;
       V.UndoOnBoard(this.board, m);
     });
     return moves;
@@ -156,7 +156,7 @@ export class DiceRules extends ChessRules {
   }
 
   postPlay(move) {
-    this.p2play.push(move.end.piece);
+    this.p2play.push(move.end.p);
     if (move.vanish.length == 2 && move.vanish[1].p == V.KING)
       this.kingPos[move.vanish[1].c] = [-1, -1];
     // Castle flags for captured king won't be updated (not important...)
@@ -175,6 +175,6 @@ export class DiceRules extends ChessRules {
   }
 
   getNotation(move) {
-    return super.getNotation(move) + "/" + move.end.piece.toUpperCase();
+    return super.getNotation(move) + "/" + move.end.p.toUpperCase();
   }
 };
-- 
2.44.0