// Pre-check: is thing on this square immobilized?
const imSq = this.isImmobilized([x, y]);
const piece = this.getPiece(x, y);
- if (!!imSq && piece != V.KING) {
- // Only option is suicide, if I'm not a king:
+ if (!!imSq) {
+ if (piece == V.KING) return [];
+ // Only option is suicide
return [
new Move({
start: { x: x, y: y },