projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix anonymous games which started with same color
[vchess.git]
/
client
/
src
/
variants
/
Monster.js
diff --git
a/client/src/variants/Monster.js
b/client/src/variants/Monster.js
index
177f71d
..
1fb6a77
100644
(file)
--- a/
client/src/variants/Monster.js
+++ b/
client/src/variants/Monster.js
@@
-14,7
+14,7
@@
export class MonsterRules extends ChessRules {
// 26 first chars are 6 rows + 6 slashes
fen.substr(0, 26)
// En passant available, and "half-castle"
// 26 first chars are 6 rows + 6 slashes
fen.substr(0, 26)
// En passant available, and "half-castle"
- .concat("
2PPPP2
/4K3 w 0 ")
+ .concat("
1PPPPPP1
/4K3 w 0 ")
.concat(fen.substr(-6, 2))
.concat(" -")
);
.concat(fen.substr(-6, 2))
.concat(" -")
);
@@
-105,10
+105,9
@@
export class MonsterRules extends ChessRules {
// Definition of 'c' in base class doesn't work:
const c = move.vanish[0].c;
const piece = move.vanish[0].p;
// Definition of 'c' in base class doesn't work:
const c = move.vanish[0].c;
const piece = move.vanish[0].p;
- if (piece == V.KING
&& move.appear.length > 0
) {
+ if (piece == V.KING) {
this.kingPos[c][0] = move.appear[0].x;
this.kingPos[c][1] = move.appear[0].y;
this.kingPos[c][0] = move.appear[0].x;
this.kingPos[c][1] = move.appear[0].y;
- return;
}
this.updateCastleFlags(move, piece);
}
}
this.updateCastleFlags(move, piece);
}