projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Hoppelpoppel too fast copy-paste :)
[vchess.git]
/
client
/
src
/
variants
/
Crazyhouse.js
diff --git
a/client/src/variants/Crazyhouse.js
b/client/src/variants/Crazyhouse.js
index
ee48544
..
db9cb57
100644
(file)
--- a/
client/src/variants/Crazyhouse.js
+++ b/
client/src/variants/Crazyhouse.js
@@
-2,6
+2,7
@@
import { ChessRules, PiPo, Move } from "@/base_rules";
import { ArrayFun } from "@/utils/array";
export class CrazyhouseRules extends ChessRules {
import { ArrayFun } from "@/utils/array";
export class CrazyhouseRules extends ChessRules {
+
static IsGoodFen(fen) {
if (!ChessRules.IsGoodFen(fen)) return false;
const fenParsed = V.ParseFen(fen);
static IsGoodFen(fen) {
if (!ChessRules.IsGoodFen(fen)) return false;
const fenParsed = V.ParseFen(fen);
@@
-165,10
+166,9
@@
export class CrazyhouseRules extends ChessRules {
}
getPotentialMovesFrom([x, y]) {
}
getPotentialMovesFrom([x, y]) {
- if (x >= V.size.x)
{
+ if (x >= V.size.x)
// Reserves, outside of board: x == sizeX(+1)
return this.getReserveMoves([x, y]);
// Reserves, outside of board: x == sizeX(+1)
return this.getReserveMoves([x, y]);
- }
// Standard moves
return super.getPotentialMovesFrom([x, y]);
}
// Standard moves
return super.getPotentialMovesFrom([x, y]);
}
@@
-253,4
+253,5
@@
export class CrazyhouseRules extends ChessRules {
move.appear[0].p != V.PAWN ? move.appear[0].p.toUpperCase() : "";
return piece + "@" + V.CoordsToSquare(move.end);
}
move.appear[0].p != V.PAWN ? move.appear[0].p.toUpperCase() : "";
return piece + "@" + V.CoordsToSquare(move.end);
}
+
};
};