projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some fixes, work on Eightpieces draft, add a few capturing variants
[vchess.git]
/
client
/
src
/
variants
/
Royalrace.js
diff --git
a/client/src/variants/Royalrace.js
b/client/src/variants/Royalrace.js
index
9318c12
..
f5c7550
100644
(file)
--- a/
client/src/variants/Royalrace.js
+++ b/
client/src/variants/Royalrace.js
@@
-21,7
+21,7
@@
export const VariantRules = class RoyalraceRules extends ChessRules {
static GenRandInitFen(randomness) {
if (randomness == 0)
static GenRandInitFen(randomness) {
if (randomness == 0)
- return "11/11/11/11/11/11/11/11/11/
QRBNP1pnbrq/KRBNP1pnbrk
w 0";
+ return "11/11/11/11/11/11/11/11/11/
qrbnp1PNBRQ/krbnp1PNBRK
w 0";
let pieces = { w: new Array(10), b: new Array(10) };
// Shuffle pieces on first and second rank
let pieces = { w: new Array(10), b: new Array(10) };
// Shuffle pieces on first and second rank
@@
-93,13
+93,13
@@
export const VariantRules = class RoyalraceRules extends ChessRules {
const blackFen = pieces["b"].join("");
return (
"11/11/11/11/11/11/11/11/11/" +
const blackFen = pieces["b"].join("");
return (
"11/11/11/11/11/11/11/11/11/" +
-
white
Fen.substr(5).split("").reverse().join("") +
+
black
Fen.substr(5).split("").reverse().join("") +
"1" +
"1" +
-
black
Fen.substr(5).split("").join("") +
+
white
Fen.substr(5).split("").join("") +
"/" +
"/" +
-
white
Fen.substr(0,5) +
+
black
Fen.substr(0,5) +
"1" +
"1" +
-
black
Fen.substr(0,5).split("").reverse().join("") +
+
white
Fen.substr(0,5).split("").reverse().join("") +
" w 0"
);
}
" w 0"
);
}
@@
-189,8
+189,7
@@
export const VariantRules = class RoyalraceRules extends ChessRules {
if (this.kingPos[color][0] == 0)
// The opposing edge is reached!
return color == "w" ? "1-0" : "0-1";
if (this.kingPos[color][0] == 0)
// The opposing edge is reached!
return color == "w" ? "1-0" : "0-1";
- if (this.atLeastOneMove())
- return "*";
+ if (this.atLeastOneMove()) return "*";
// Stalemate (will probably never happen)
return "1/2";
}
// Stalemate (will probably never happen)
return "1/2";
}