6066e5122d05588c9de12bb3dadb9de5661cc7c5
[xogo.git] / variants / _Berolina / class.js
1 import ChessRules from "/base_rules.js";
2
3 export default class BerolinaRules extends ChessRules {
4
5 pieces(color, x, y) {
6 const pawnShift = (color == "w" ? -1 : 1);
7 let res = super.pieces(color, x, y);
8 res['p'].moves = [
9 {
10 steps: [[pawnShift, 1], [pawnShift, -1]],
11 range: 1
12 }
13 ];
14 res['p'].attack = [
15 {
16 steps: [[pawnShift, 0]],
17 range: 1
18 }
19 ];
20 return res;
21 }
22
23 };