projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unambiguous section in the PGN + some fixes + code formatting and fix typos
[vchess.git]
/
client
/
src
/
variants
/
Wildebeest.js
diff --git
a/client/src/variants/Wildebeest.js
b/client/src/variants/Wildebeest.js
index
5bb50e8
..
8664e5e
100644
(file)
--- a/
client/src/variants/Wildebeest.js
+++ b/
client/src/variants/Wildebeest.js
@@
-20,7
+20,9
@@
export class WildebeestRules extends ChessRules {
static get steps() {
return Object.assign(
static get steps() {
return Object.assign(
- ChessRules.steps, //add camel moves:
+ {},
+ ChessRules.steps,
+ // Add camel moves:
{
c: [
[-3, -1],
{
c: [
[-3, -1],
@@
-243,10
+245,14
@@
export class WildebeestRules extends ChessRules {
static GenRandInitFen(randomness) {
if (!randomness) randomness = 2;
static GenRandInitFen(randomness) {
if (!randomness) randomness = 2;
- if (randomness == 0)
- return "rnccwkqbbnr/ppppppppppp/11/11/11/11/11/11/PPPPPPPPPPP/RNBBQKWCCNR w 0 akak -";
+ if (randomness == 0) {
+ return (
+ "rnccwkqbbnr/ppppppppppp/92/92/92/92/92/92/PPPPPPPPPPP/RNBBQKWCCNR " +
+ "w 0 akak -"
+ );
+ }
- let pieces = { w: new Array(1
0), b: new Array(10
) };
+ let pieces = { w: new Array(1
1), b: new Array(11
) };
let flags = "";
for (let c of ["w", "b"]) {
if (c == 'b' && randomness == 1) {
let flags = "";
for (let c of ["w", "b"]) {
if (c == 'b' && randomness == 1) {
@@
-311,7
+317,7
@@
export class WildebeestRules extends ChessRules {
}
return (
pieces["b"].join("") +
}
return (
pieces["b"].join("") +
- "/ppppppppppp/
11/11/11/11/11/11
/PPPPPPPPPPP/" +
+ "/ppppppppppp/
92/92/92/92/92/92
/PPPPPPPPPPP/" +
pieces["w"].join("").toUpperCase() +
" w 0 " + flags + " -"
);
pieces["w"].join("").toUpperCase() +
" w 0 " + flags + " -"
);