projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Berolina en passant
[vchess.git]
/
client
/
src
/
variants
/
Wildebeest.js
diff --git
a/client/src/variants/Wildebeest.js
b/client/src/variants/Wildebeest.js
index
1634f49
..
565f627
100644
(file)
--- a/
client/src/variants/Wildebeest.js
+++ b/
client/src/variants/Wildebeest.js
@@
-235,8
+235,8
@@
export const VariantRules = class WildebeestRules extends ChessRules {
static get VALUES() {
return Object.assign(
static get VALUES() {
return Object.assign(
- ChessRules.VALUES,
- { c: 3, w: 7 } //experimental
+ { c: 3, w: 7 }, //experimental
+ ChessRules.VALUES
);
}
);
}
@@
-244,9
+244,18
@@
export const VariantRules = class WildebeestRules extends ChessRules {
return 2;
}
return 2;
}
- static GenRandInitFen() {
+ static GenRandInitFen(randomness) {
+ if (!randomness) randomness = 2;
+ if (randomness == 0)
+ return "rnccwkqbbnr/ppppppppppp/11/11/11/11/11/11/PPPPPPPPPPP/RNBBQKWCCNR w 0 1111 -";
+
let pieces = { w: new Array(10), b: new Array(10) };
for (let c of ["w", "b"]) {
let pieces = { w: new Array(10), b: new Array(10) };
for (let c of ["w", "b"]) {
+ if (c == 'b' && randomness == 1) {
+ pieces['b'] = pieces['w'];
+ break;
+ }
+
let positions = ArrayFun.range(11);
// Get random squares for bishops + camels (different colors)
let positions = ArrayFun.range(11);
// Get random squares for bishops + camels (different colors)
@@
-264,7
+273,7
@@
export const VariantRules = class WildebeestRules extends ChessRules {
for (let idx of randIndexes.concat(randIndexes_tmp).sort((a, b) => {
return b - a;
})) {
for (let idx of randIndexes.concat(randIndexes_tmp).sort((a, b) => {
return b - a;
})) {
- //
l
argest indices first
+ //
L
argest indices first
positions.splice(idx, 1);
}
positions.splice(idx, 1);
}