projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better notation [Rugby]
[vchess.git]
/
client
/
src
/
variants
/
Pacosako.js
diff --git
a/client/src/variants/Pacosako.js
b/client/src/variants/Pacosako.js
index
158abf2
..
4745f63
100644
(file)
--- a/
client/src/variants/Pacosako.js
+++ b/
client/src/variants/Pacosako.js
@@
-372,7
+372,7
@@
export class PacosakoRules extends ChessRules {
}
let baseMoves = [];
const c = this.turn;
}
let baseMoves = [];
const c = this.turn;
- switch (piece
|| this.getPiece(x, y)
) {
+ switch (piece) {
case V.PAWN: {
const firstRank = (c == 'w' ? 7 : 0);
baseMoves = this.getPotentialPawnMoves([x, y]).filter(m => {
case V.PAWN: {
const firstRank = (c == 'w' ? 7 : 0);
baseMoves = this.getPotentialPawnMoves([x, y]).filter(m => {
@@
-768,8
+768,8
@@
export class PacosakoRules extends ChessRules {
// NOTE: lm.p != V.KING, always.
const piece =
!!lm
// NOTE: lm.p != V.KING, always.
const piece =
!!lm
- ? lm.p
:
- this.getPiece(move.vanish[0].x, move.vanish[0].y);
+ ? lm.p
+
:
this.getPiece(move.vanish[0].x, move.vanish[0].y);
if (piece == V.KING)
this.kingPos[c] = [move.appear[0].x, move.appear[0].y];
this.updateCastleFlags(move, piece);
if (piece == V.KING)
this.kingPos[c] = [move.appear[0].x, move.appear[0].y];
this.updateCastleFlags(move, piece);