return V.CanFlip;
}
- // Some variants require turn indicator
- // (generally when analysis or flip is diabled)
- static get ShowTurn() {
- return !V.CanAnalyze || V.ShowMoves != "all" || !V.CanFlip;
- }
- get showTurn() {
- return V.ShowTurn;
- }
-
static get IMAGE_EXTENSION() {
// All pieces should be in the SVG format
return ".svg";
const s = move.start,
e = move.end;
if (
- Math.abs(s.x - e.x) == 2 &&
s.y == e.y &&
- move.appear[0].p == V.PAWN
+ Math.abs(s.x - e.x) == 2 &&
+ // Next conditions for variants like Atomic or Rifle, Recycle...
+ (move.appear.length > 0 && move.appear[0].p == V.PAWN) &&
+ (move.vanish.length > 0 && move.vanish[0].p == V.PAWN)
) {
return {
x: (s.x + e.x) / 2,
}
// Stop at the first move found
+ // TODO: not really, it explores all moves from a square but one would suffice.
atLeastOneMove() {
const color = this.turn;
for (let i = 0; i < V.size.x; i++) {