projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Synochess
[vchess.git]
/
client
/
src
/
variants
/
Wildebeest.js
diff --git
a/client/src/variants/Wildebeest.js
b/client/src/variants/Wildebeest.js
index
93353f9
..
647a234
100644
(file)
--- a/
client/src/variants/Wildebeest.js
+++ b/
client/src/variants/Wildebeest.js
@@
-181,15
+181,12
@@
export class WildebeestRules extends ChessRules {
}
getPotentialCamelMoves(sq) {
}
getPotentialCamelMoves(sq) {
- return this.getSlideNJumpMoves(sq, V.steps[V.CAMEL],
"oneStep"
);
+ return this.getSlideNJumpMoves(sq, V.steps[V.CAMEL],
1
);
}
getPotentialWildebeestMoves(sq) {
return this.getSlideNJumpMoves(
}
getPotentialWildebeestMoves(sq) {
return this.getSlideNJumpMoves(
- sq,
- V.steps[V.KNIGHT].concat(V.steps[V.CAMEL]),
- "oneStep"
- );
+ sq, V.steps[V.KNIGHT].concat(V.steps[V.CAMEL]), 1);
}
getPPpath(m) {
}
getPPpath(m) {
@@
-276,22
+273,12
@@
export class WildebeestRules extends ChessRules {
isAttackedByCamel(sq, color) {
return this.isAttackedBySlideNJump(
isAttackedByCamel(sq, color) {
return this.isAttackedBySlideNJump(
- sq,
- color,
- V.CAMEL,
- V.steps[V.CAMEL],
- "oneStep"
- );
+ sq, color, V.CAMEL, V.steps[V.CAMEL], 1);
}
isAttackedByWildebeest(sq, color) {
return this.isAttackedBySlideNJump(
}
isAttackedByWildebeest(sq, color) {
return this.isAttackedBySlideNJump(
- sq,
- color,
- V.WILDEBEEST,
- V.steps[V.KNIGHT].concat(V.steps[V.CAMEL]),
- "oneStep"
- );
+ sq, color, V.WILDEBEEST, V.steps[V.KNIGHT].concat(V.steps[V.CAMEL]), 1);
}
getCurrentScore() {
}
getCurrentScore() {
@@
-311,8
+298,8
@@
export class WildebeestRules extends ChessRules {
return 2;
}
return 2;
}
- static GenRandInitFen(
randomnes
s) {
- if (randomness == 0) {
+ static GenRandInitFen(
option
s) {
+ if (
options.
randomness == 0) {
return (
"rnccwkqbbnr/ppppppppppp/92/92/92/92/92/92/PPPPPPPPPPP/RNBBQKWCCNR " +
"w 0 akak -"
return (
"rnccwkqbbnr/ppppppppppp/92/92/92/92/92/92/PPPPPPPPPPP/RNBBQKWCCNR " +
"w 0 akak -"
@@
-322,7
+309,7
@@
export class WildebeestRules extends ChessRules {
let pieces = { w: new Array(11), b: new Array(11) };
let flags = "";
for (let c of ["w", "b"]) {
let pieces = { w: new Array(11), b: new Array(11) };
let flags = "";
for (let c of ["w", "b"]) {
- if (c == 'b' && randomness == 1) {
+ if (c == 'b' &&
options.
randomness == 1) {
pieces['b'] = pieces['w'];
flags += flags;
break;
pieces['b'] = pieces['w'];
flags += flags;
break;