projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix SuctionChess, draft HiddenRules (unfinished)
[vchess.git]
/
client
/
src
/
variants
/
Baroque.js
diff --git
a/client/src/variants/Baroque.js
b/client/src/variants/Baroque.js
index
5687e22
..
8f1f9ba
100644
(file)
--- a/
client/src/variants/Baroque.js
+++ b/
client/src/variants/Baroque.js
@@
-11,17
+11,17
@@
export const VariantRules = class BaroqueRules extends ChessRules {
return false;
}
return false;
}
- static getPpath(b) {
+ static get PIECES() {
+ return ChessRules.PIECES.concat([V.IMMOBILIZER]);
+ }
+
+ getPpath(b) {
if (b[1] == "m")
//'m' for Immobilizer (I is too similar to 1)
return "Baroque/" + b;
return b; //usual piece
}
if (b[1] == "m")
//'m' for Immobilizer (I is too similar to 1)
return "Baroque/" + b;
return b; //usual piece
}
- static get PIECES() {
- return ChessRules.PIECES.concat([V.IMMOBILIZER]);
- }
-
// No castling, but checks, so keep track of kings
setOtherVariables(fen) {
this.kingPos = { w: [-1, -1], b: [-1, -1] };
// No castling, but checks, so keep track of kings
setOtherVariables(fen) {
this.kingPos = { w: [-1, -1], b: [-1, -1] };
@@
-591,7
+591,8
@@
export const VariantRules = class BaroqueRules extends ChessRules {
} else if (move.appear[0].p == V.KING)
notation = "K" + (move.vanish.length > 1 ? "x" : "") + finalSquare;
else notation = move.appear[0].p.toUpperCase() + finalSquare;
} else if (move.appear[0].p == V.KING)
notation = "K" + (move.vanish.length > 1 ? "x" : "") + finalSquare;
else notation = move.appear[0].p.toUpperCase() + finalSquare;
- if (move.vanish.length > 1 && move.appear[0].p != V.KING) notation += "X"; //capture mark (not describing what is captured...)
+ // Add a capture mark (not describing what is captured...):
+ if (move.vanish.length > 1 && move.appear[0].p != V.KING) notation += "X";
return notation;
}
};
return notation;
}
};