projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Castle Chess
[vchess.git]
/
client
/
src
/
variants
/
Colorbound.js
diff --git
a/client/src/variants/Colorbound.js
b/client/src/variants/Colorbound.js
index
034f957
..
7e0a622
100644
(file)
--- a/
client/src/variants/Colorbound.js
+++ b/
client/src/variants/Colorbound.js
@@
-7,7
+7,11
@@
export class ColorboundRules extends ChessRules {
return Object.assign(
{},
ChessRules.PawnSpecs,
return Object.assign(
{},
ChessRules.PawnSpecs,
- { promotions: V.PIECES }
+ {
+ promotions:
+ ChessRules.PawnSpecs.promotions.concat(
+ [V.C_ROOK, V.C_KNIGHT, V.C_BISHOP, V.C_QUEEN])
+ }
);
}
);
}
@@
-80,7
+84,7
@@
export class ColorboundRules extends ChessRules {
// Add turn + flags + enpassant
return (
pieces["b"].join("") +
// Add turn + flags + enpassant
return (
pieces["b"].join("") +
- "/
8/pppppppp
/8/8/8/PPPPPPPP/" +
+ "/
pppppppp/8
/8/8/8/PPPPPPPP/" +
pieces["w"].join("").toUpperCase() +
" w 0 " + flags + " -"
);
pieces["w"].join("").toUpperCase() +
" w 0 " + flags + " -"
);
@@
-101,7
+105,7
@@
export class ColorboundRules extends ChessRules {
static get PIECES() {
return (
static get PIECES() {
return (
- ChessRules.PIECES.concat([V.C_ROOK, V.C_K
IN
GHT, V.C_BISHOP, V.C_QUEEN])
+ ChessRules.PIECES.concat([V.C_ROOK, V.C_K
NI
GHT, V.C_BISHOP, V.C_QUEEN])
);
}
);
}
@@
-311,7
+315,7
@@
export class ColorboundRules extends ChessRules {
return (
this.isAttackedBySlideNJump(sq, color, V.C_QUEEN, V.steps[V.BISHOP]) ||
this.isAttackedBySlideNJump(
return (
this.isAttackedBySlideNJump(sq, color, V.C_QUEEN, V.steps[V.BISHOP]) ||
this.isAttackedBySlideNJump(
- sq, color, V.C_
ROOK
, V.steps[V.KNIGHT], "oneStep")
+ sq, color, V.C_
QUEEN
, V.steps[V.KNIGHT], "oneStep")
);
}
);
}
@@
-327,4
+331,8
@@
export class ColorboundRules extends ChessRules {
}
);
}
}
);
}
+
+ static get SEARCH_DEPTH() {
+ return 2;
+ }
};
};