projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed Checkered variant
[xogo.git]
/
variants
/
_SpecialCaptures
/
class.js
diff --git
a/variants/_SpecialCaptures/class.js
b/variants/_SpecialCaptures/class.js
index
9b48266
..
e6a0db1
100644
(file)
--- a/
variants/_SpecialCaptures/class.js
+++ b/
variants/_SpecialCaptures/class.js
@@
-23,7
+23,7
@@
export default class AbstractSpecialCaptureRules extends ChessRules {
addPincerCaptures(moves, byChameleon) {
const steps = this.pieces()['p'].moves[0].steps;
const color = this.turn;
addPincerCaptures(moves, byChameleon) {
const steps = this.pieces()['p'].moves[0].steps;
const color = this.turn;
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
moves.forEach(m => {
if (byChameleon && m.start.x != m.end.x && m.start.y != m.end.y)
// Chameleon not moving as pawn
moves.forEach(m => {
if (byChameleon && m.start.x != m.end.x && m.start.y != m.end.y)
// Chameleon not moving as pawn
@@
-61,7
+61,7
@@
export default class AbstractSpecialCaptureRules extends ChessRules {
addCoordinatorCaptures(moves, byChameleon) {
const color = this.turn;
addCoordinatorCaptures(moves, byChameleon) {
const color = this.turn;
- const oppCol = V.GetOpp
Col
(color);
+ const oppCol = V.GetOpp
Turn
(color);
const kp = this.searchKingPos(color)[0];
moves.forEach(m => {
// Check piece-king rectangle (if any) corners for enemy pieces
const kp = this.searchKingPos(color)[0];
moves.forEach(m => {
// Check piece-king rectangle (if any) corners for enemy pieces
@@
-91,7
+91,7
@@
export default class AbstractSpecialCaptureRules extends ChessRules {
// Look in every direction for captures
const steps = this.pieces()['r'].moves[0].steps;
const color = this.turn;
// Look in every direction for captures
const steps = this.pieces()['r'].moves[0].steps;
const color = this.turn;
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
let moves = [];
outerLoop: for (let step of steps) {
let [i, j] = [x + step[0], this.getY(y + step[1])];
let moves = [];
outerLoop: for (let step of steps) {
let [i, j] = [x + step[0], this.getY(y + step[1])];
@@
-160,7
+160,7
@@
export default class AbstractSpecialCaptureRules extends ChessRules {
const adjacentSteps = this.pieces()['r'].moves[0].steps;
let capturingPullDir = {};
const color = this.turn;
const adjacentSteps = this.pieces()['r'].moves[0].steps;
let capturingPullDir = {};
const color = this.turn;
- const oppCol = C.GetOpp
Col
(color);
+ const oppCol = C.GetOpp
Turn
(color);
if (type != "push") {
adjacentSteps.forEach(step => {
const [bi, bj] = [sx - step[0], this.getY(sy - step[1])];
if (type != "push") {
adjacentSteps.forEach(step => {
const [bi, bj] = [sx - step[0], this.getY(sy - step[1])];