projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Attempt to clarify installation instructions a little
[vchess.git]
/
client
/
src
/
variants
/
Twokings.js
diff --git
a/client/src/variants/Twokings.js
b/client/src/variants/Twokings.js
index
6606da5
..
d80a57d
100644
(file)
--- a/
client/src/variants/Twokings.js
+++ b/
client/src/variants/Twokings.js
@@
-55,8
+55,8
@@
export class TwokingsRules extends CoregalRules {
return squares;
}
return squares;
}
- static GenRandInitFen(
randomnes
s) {
- if (randomness == 0)
+ static GenRandInitFen(
option
s) {
+ if (
options.
randomness == 0)
return "rnqkkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNQKKBNR w 0 adehadeh -";
const replaceBishop = (fen, first, ch1, ch2) => {
return "rnqkkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNQKKBNR w 0 adehadeh -";
const replaceBishop = (fen, first, ch1, ch2) => {
@@
-84,11
+84,11
@@
export class TwokingsRules extends CoregalRules {
};
const fen =
};
const fen =
- CoregalRules.GenRandInitFen(
randomnes
s)
+ CoregalRules.GenRandInitFen(
option
s)
.replace("q", "k").replace("Q", "K");
// Now replace a bishop by the queen,
// so that bishops are of different colors:
.replace("q", "k").replace("Q", "K");
// Now replace a bishop by the queen,
// so that bishops are of different colors:
- if (randomness == 1) return sameIndexReplace(fen);
+ if (
options.
randomness == 1) return sameIndexReplace(fen);
const wOdd = fen.indexOf('B') % 2;
const bOdd = fen.indexOf('b') % 2;
// Since there are 7 slashes, different oddities means symmetric
const wOdd = fen.indexOf('B') % 2;
const bOdd = fen.indexOf('b') % 2;
// Since there are 7 slashes, different oddities means symmetric