// Modify capturing moves among listed pincer moves
addPincerCaptures(moves, byChameleon) {
const steps = this.pieces()['p'].moves[0].steps;
// Modify capturing moves among listed pincer moves
addPincerCaptures(moves, byChameleon) {
const steps = this.pieces()['p'].moves[0].steps;
getLeaperCaptures([x, y], byChameleon, onlyOne) {
// Look in every direction for captures
const steps = this.pieces()['r'].moves[0].steps;
getLeaperCaptures([x, y], byChameleon, onlyOne) {
// Look in every direction for captures
const steps = this.pieces()['r'].moves[0].steps;
// type: nothing (freely, capture all), or pull or push, or "exclusive"
addPushmePullyouCaptures(moves, byChameleon, type) {
// type: nothing (freely, capture all), or pull or push, or "exclusive"
addPushmePullyouCaptures(moves, byChameleon, type) {
const [sx, sy] = [moves[0].start.x, moves[0].start.y];
const adjacentSteps = this.pieces()['r'].moves[0].steps;
let capturingPullDir = {};
const [sx, sy] = [moves[0].start.x, moves[0].start.y];
const adjacentSteps = this.pieces()['r'].moves[0].steps;
let capturingPullDir = {};
// Generate all potential opponent moves, check if king captured.
// TODO: do it more efficiently.
const color = this.getColor(x, y);
for (let i = 0; i < this.size.x; i++) {
for (let j = 0; j < this.size.y; j++) {
if (
// Generate all potential opponent moves, check if king captured.
// TODO: do it more efficiently.
const color = this.getColor(x, y);
for (let i = 0; i < this.size.x; i++) {
for (let j = 0; j < this.size.y; j++) {
if (