projects
/
xogo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TODO: Cannibal + pawnfall, at least, fail
[xogo.git]
/
base_rules.js
diff --git
a/base_rules.js
b/base_rules.js
index
e7d58b2
..
a2cb951
100644
(file)
--- a/
base_rules.js
+++ b/
base_rules.js
@@
-1347,6
+1347,8
@@
export default class ChessRules {
});
}
});
}
+// TODO: pawnfall + Cannibal issues
+
pawnPostProcess(moves, color, oppCol) {
let moreMoves = [];
const lastRank = (color == "w" ? 0 : this.size.x - 1);
pawnPostProcess(moves, color, oppCol) {
let moreMoves = [];
const lastRank = (color == "w" ? 0 : this.size.x - 1);
@@
-2154,6
+2156,10
@@
export default class ChessRules {
return;
}
let movingPiece = this.getDomPiece(move.start.x, move.start.y);
return;
}
let movingPiece = this.getDomPiece(move.start.x, move.start.y);
+ if (!movingPiece) { //TODO this shouldn't be required
+ callback();
+ return;
+ }
const initTransform = movingPiece.style.transform;
let chessboard =
document.getElementById(this.containerId).querySelector(".chessboard");
const initTransform = movingPiece.style.transform;
let chessboard =
document.getElementById(this.containerId).querySelector(".chessboard");