t: "q",
u: "r",
c: "b",
- o: "n",
- l: "k"
+ o: "n"
};
}
static get BOMB_CODE() {
q: "t",
r: "u",
b: "c",
- n: "o",
- k: "l"
+ n: "o"
};
}
);
}
- // Initiate the game by choosing a square for the bomb:
+ // Initiate the game by choosing a piece holding the bomb:
doClick(square) {
const c = this.turn;
if (
}
const [x, y] = square;
const piece = super.getPiece(x, y);
+ if (piece == V.KING) return null; //no bomb on king!
return new Move({
appear: [ new PiPo({ x: x, y: y, c: c, p: V.BOMB_CODE[piece] }) ],
vanish: [ new PiPo({ x: x, y: y, c: c, p: piece }) ],