projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some fixes + draft newmove pingback logic (unfinished, not working)
[vchess.git]
/
client
/
src
/
variants
/
Crazyhouse.js
diff --git
a/client/src/variants/Crazyhouse.js
b/client/src/variants/Crazyhouse.js
index
d7d82b8
..
984c902
100644
(file)
--- a/
client/src/variants/Crazyhouse.js
+++ b/
client/src/variants/Crazyhouse.js
@@
-28,8
+28,8
@@
export const VariantRules = class CrazyhouseRules extends ChessRules {
});
}
});
}
- static GenRandInitFen() {
- return ChessRules.GenRandInitFen() + " 0000000000 -";
+ static GenRandInitFen(
randomness
) {
+ return ChessRules.GenRandInitFen(
randomness
) + " 0000000000 -";
}
getFen() {
}
getFen() {
@@
-38,6
+38,17
@@
export const VariantRules = class CrazyhouseRules extends ChessRules {
);
}
);
}
+ getFenForRepeat() {
+ return (
+ this.getBaseFen() + "_" +
+ this.getTurnFen() + "_" +
+ this.getFlagsFen() + "_" +
+ this.getEnpassantFen() + "_" +
+ this.getReserveFen() + "_" +
+ this.getPromotedFen()
+ );
+ }
+
getReserveFen() {
let counts = new Array(10);
for (
getReserveFen() {
let counts = new Array(10);
for (
@@
-104,7
+115,7
@@
export const VariantRules = class CrazyhouseRules extends ChessRules {
}
// Used by the interface:
}
// Used by the interface:
- getReservePpath(
color, index
) {
+ getReservePpath(
index, color
) {
return color + V.RESERVE_PIECES[index];
}
return color + V.RESERVE_PIECES[index];
}