Draft Ball variant + some fixes, enhancements and code cleaning
[vchess.git] / client / src / variants / Suction.js
index d15a7c8..2038e4f 100644 (file)
@@ -20,9 +20,10 @@ export class SuctionRules extends ChessRules {
   }
 
   static ParseFen(fen) {
-    return Object.assign({}, ChessRules.ParseFen(fen), {
-      cmove: fen.split(" ")[4]
-    });
+    return Object.assign(
+      ChessRules.ParseFen(fen),
+      { cmove: fen.split(" ")[4] }
+    );
   }
 
   static IsGoodFen(fen) {
@@ -182,10 +183,8 @@ export class SuctionRules extends ChessRules {
   getCurrentScore() {
     const color = this.turn;
     const kp = this.kingPos[color];
-    if (color == "w" && kp[0] == 0)
-      return "0-1";
-    if (color == "b" && kp[0] == V.size.x - 1)
-      return "1-0";
+    if (color == "w" && kp[0] == 0) return "0-1";
+    if (color == "b" && kp[0] == V.size.x - 1) return "1-0";
     // King is not on the opposite edge: game not over
     return "*";
   }