Better pieces values in Knghtrelay variant
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 29 Feb 2020 23:51:39 +0000 (00:51 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 29 Feb 2020 23:51:39 +0000 (00:51 +0100)
client/src/variants/Knightrelay.js

index daa7bbb..eebb0f2 100644 (file)
@@ -77,6 +77,17 @@ export const VariantRules = class KnightrelayRules extends ChessRules {
     return false;
   }
 
     return false;
   }
 
+  static get VALUES() {
+    return {
+      p: 1,
+      r: 5,
+      n: 7, //the knight is valuable
+      b: 3,
+      q: 9,
+      k: 1000
+    };
+  }
+
   getNotation(move) {
     if (move.appear.length == 2 && move.appear[0].p == V.KING)
       // Castle
   getNotation(move) {
     if (move.appear.length == 2 && move.appear[0].p == V.KING)
       // Castle