projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change castle flags. Eightpieces still not OK, but almost
[vchess.git]
/
client
/
src
/
variants
/
Wildebeest.js
diff --git
a/client/src/variants/Wildebeest.js
b/client/src/variants/Wildebeest.js
index
565f627
..
bf5c178
100644
(file)
--- a/
client/src/variants/Wildebeest.js
+++ b/
client/src/variants/Wildebeest.js
@@
-247,12
+247,14
@@
export const VariantRules = class WildebeestRules extends ChessRules {
static GenRandInitFen(randomness) {
if (!randomness) randomness = 2;
if (randomness == 0)
static GenRandInitFen(randomness) {
if (!randomness) randomness = 2;
if (randomness == 0)
- return "rnccwkqbbnr/ppppppppppp/11/11/11/11/11/11/PPPPPPPPPPP/RNBBQKWCCNR w 0
1111
-";
+ return "rnccwkqbbnr/ppppppppppp/11/11/11/11/11/11/PPPPPPPPPPP/RNBBQKWCCNR w 0
akak
-";
let pieces = { w: new Array(10), b: new Array(10) };
let pieces = { w: new Array(10), b: new Array(10) };
+ let flags = "";
for (let c of ["w", "b"]) {
if (c == 'b' && randomness == 1) {
pieces['b'] = pieces['w'];
for (let c of ["w", "b"]) {
if (c == 'b' && randomness == 1) {
pieces['b'] = pieces['w'];
+ flags += flags;
break;
}
break;
}
@@
-308,12
+310,13
@@
export const VariantRules = class WildebeestRules extends ChessRules {
pieces[c][bishop2Pos] = "b";
pieces[c][knight2Pos] = "n";
pieces[c][rook2Pos] = "r";
pieces[c][bishop2Pos] = "b";
pieces[c][knight2Pos] = "n";
pieces[c][rook2Pos] = "r";
+ flags += V.CoordToColumn(rook1Pos) + V.CoordToColumn(rook2Pos);
}
return (
pieces["b"].join("") +
"/ppppppppppp/11/11/11/11/11/11/PPPPPPPPPPP/" +
pieces["w"].join("").toUpperCase() +
}
return (
pieces["b"].join("") +
"/ppppppppppp/11/11/11/11/11/11/PPPPPPPPPPP/" +
pieces["w"].join("").toUpperCase() +
- " w 0
1111
-"
+ " w 0
" + flags + "
-"
);
}
};
);
}
};