Untested draft refactor both/moves/attack for pieces specs
[xogo.git] / variants / _Berolina / pawnSpec.js
diff --git a/variants/_Berolina/pawnSpec.js b/variants/_Berolina/pawnSpec.js
new file mode 100644 (file)
index 0000000..088e7df
--- /dev/null
@@ -0,0 +1,19 @@
+export default BerolinaPawnSpec = (color) => {
+
+  const pawnShift = (color == "w" ? -1 : 1);
+  return {
+    moves: [
+      {
+        steps: [[pawnShift, 1], [pawnShift, -1]],
+        range: 1
+      }
+    ],
+    attack: [
+      {
+        steps: [[pawnShift, 0]],
+        range: 1
+      }
+    ]
+  };
+
+};