projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update TODO
[vchess.git]
/
client
/
src
/
variants
/
Marseille.js
diff --git
a/client/src/variants/Marseille.js
b/client/src/variants/Marseille.js
index
ed9965b
..
90084dc
100644
(file)
--- a/
client/src/variants/Marseille.js
+++ b/
client/src/variants/Marseille.js
@@
-14,10
+14,6
@@
export class MarseilleRules extends ChessRules {
return true;
}
return true;
}
- getTurnFen() {
- return this.turn + this.subTurn;
- }
-
// There may be 2 enPassant squares (if 2 pawns jump 2 squares in same turn)
getEnpassantFen() {
return this.epSquares[this.epSquares.length - 1].map(
// There may be 2 enPassant squares (if 2 pawns jump 2 squares in same turn)
getEnpassantFen() {
return this.epSquares[this.epSquares.length - 1].map(
@@
-37,10
+33,8
@@
export class MarseilleRules extends ChessRules {
this.scanKings(fen);
// Extract subTurn from turn indicator: "w" (first move), or
// "w1" or "w2" white subturn 1 or 2, and same for black
this.scanKings(fen);
// Extract subTurn from turn indicator: "w" (first move), or
// "w1" or "w2" white subturn 1 or 2, and same for black
- const fullTurn = V.ParseFen(fen).turn;
- this.turn = fullTurn[0];
- // At move 1, the subTurn doesn't need to be specified:
- this.subTurn = fullTurn[1] || 1;
+ this.turn = parsedFen.turn;
+ this.subTurn = 1;
}
getEnpassantCaptures([x, y], shiftX) {
}
getEnpassantCaptures([x, y], shiftX) {
@@
-124,7
+118,7
@@
export class MarseilleRules extends ChessRules {
if (piece == V.KING && move.appear.length > 0) {
this.kingPos[c][0] = move.appear[0].x;
this.kingPos[c][1] = move.appear[0].y;
if (piece == V.KING && move.appear.length > 0) {
this.kingPos[c][0] = move.appear[0].x;
this.kingPos[c][1] = move.appear[0].y;
-
if (V.HasCastle)
this.castleFlags[c] = [V.size.y, V.size.y];
+ this.castleFlags[c] = [V.size.y, V.size.y];
return;
}
const oppCol = V.GetOppCol(c);
return;
}
const oppCol = V.GetOppCol(c);