projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typo
[vchess.git]
/
client
/
src
/
variants
/
Crazyhouse.js
diff --git
a/client/src/variants/Crazyhouse.js
b/client/src/variants/Crazyhouse.js
index
d677823
..
0a237c7
100644
(file)
--- a/
client/src/variants/Crazyhouse.js
+++ b/
client/src/variants/Crazyhouse.js
@@
-28,6
+28,13
@@
export const VariantRules = class CrazyhouseRules extends ChessRules {
});
}
});
}
+ getEpSquare(moveOrSquare) {
+ if (typeof moveOrSquare !== "object" || moveOrSquare.vanish.length > 0)
+ return super.getEpSquare(moveOrSquare);
+ // Landing move: no en-passant
+ return undefined;
+ }
+
static GenRandInitFen(randomness) {
return ChessRules.GenRandInitFen(randomness) + " 0000000000 -";
}
static GenRandInitFen(randomness) {
return ChessRules.GenRandInitFen(randomness) + " 0000000000 -";
}
@@
-118,6
+125,14
@@
export const VariantRules = class CrazyhouseRules extends ChessRules {
getReservePpath(index, color) {
return color + V.RESERVE_PIECES[index];
}
getReservePpath(index, color) {
return color + V.RESERVE_PIECES[index];
}
+// // Version if some day I have pieces with numbers printed on it:
+// getReservePpath(index, color) {
+// return (
+// "Crazyhouse/" +
+// color + V.RESERVE_PIECES[index] +
+// "_" + this.vr.reserve[playingColor][V.RESERVE_PIECES[i]]
+// );
+// }
// Ordering on reserve pieces
static get RESERVE_PIECES() {
// Ordering on reserve pieces
static get RESERVE_PIECES() {