projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hamilton: no postPlay/Undo
[vchess.git]
/
client
/
src
/
variants
/
Enpassant.js
diff --git
a/client/src/variants/Enpassant.js
b/client/src/variants/Enpassant.js
index
53f5c4f
..
cb21830
100644
(file)
--- a/
client/src/variants/Enpassant.js
+++ b/
client/src/variants/Enpassant.js
@@
-1,6
+1,7
@@
import { ChessRules, PiPo, Move } from "@/base_rules";
export class EnpassantRules extends ChessRules {
import { ChessRules, PiPo, Move } from "@/base_rules";
export class EnpassantRules extends ChessRules {
+
static IsGoodEnpassant(enpassant) {
if (enpassant != "-") {
const squares = enpassant.split(",");
static IsGoodEnpassant(enpassant) {
if (enpassant != "-") {
const squares = enpassant.split(",");
@@
-13,6
+14,10
@@
export class EnpassantRules extends ChessRules {
return true;
}
return true;
}
+ getPpath(b) {
+ return (b[1] == V.KNIGHT ? "Enpassant/" : "") + b;
+ }
+
getEpSquare(moveOrSquare) {
if (!moveOrSquare) return undefined;
if (typeof moveOrSquare === "string") {
getEpSquare(moveOrSquare) {
if (!moveOrSquare) return undefined;
if (typeof moveOrSquare === "string") {
@@
-200,4
+205,5
@@
export class EnpassantRules extends ChessRules {
k: 1000
};
}
k: 1000
};
}
+
};
};