projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Football
[vchess.git]
/
client
/
src
/
variants
/
Doublearmy.js
diff --git
a/client/src/variants/Doublearmy.js
b/client/src/variants/Doublearmy.js
index
8a6c806
..
87d262a
100644
(file)
--- a/
client/src/variants/Doublearmy.js
+++ b/
client/src/variants/Doublearmy.js
@@
-19,8
+19,8
@@
export class DoublearmyRules extends ChessRules {
return (b[1] == V.COMMONER ? "Doublearmy/" : "") + b;
}
return (b[1] == V.COMMONER ? "Doublearmy/" : "") + b;
}
- static GenRandInitFen(
randomnes
s) {
- const fen = ChessRules.GenRandInitFen(
randomnes
s);
+ static GenRandInitFen(
option
s) {
+ const fen = ChessRules.GenRandInitFen(
option
s);
const rows = fen.split(" ")[0].split("/");
return (
rows[0] + "/" +
const rows = fen.split(" ")[0].split("/");
return (
rows[0] + "/" +
@@
-45,10
+45,7
@@
export class DoublearmyRules extends ChessRules {
getPotentialCommonerMoves(sq) {
return this.getSlideNJumpMoves(
getPotentialCommonerMoves(sq) {
return this.getSlideNJumpMoves(
- sq,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
- "oneStep"
- );
+ sq, V.steps[V.ROOK].concat(V.steps[V.BISHOP]), 1);
}
isAttacked(sq, color) {
}
isAttacked(sq, color) {
@@
-60,19
+57,13
@@
export class DoublearmyRules extends ChessRules {
isAttackedByCommoner(sq, color) {
return this.isAttackedBySlideNJump(
isAttackedByCommoner(sq, color) {
return this.isAttackedBySlideNJump(
- sq,
- color,
- V.COMMONER,
- V.steps[V.ROOK].concat(V.steps[V.BISHOP]),
- "oneStep"
- );
+ sq, color, V.COMMONER, V.steps[V.ROOK].concat(V.steps[V.BISHOP]), 1);
}
static get VALUES() {
return Object.assign(
}
static get VALUES() {
return Object.assign(
- {},
- ChessRules.VALUES,
- { c: 5 }
+ { c: 5 },
+ ChessRules.VALUES
);
}
);
}