projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Forbid capturing wall in Omega chess...
[vchess.git]
/
client
/
src
/
variants
/
Omega.js
diff --git
a/client/src/variants/Omega.js
b/client/src/variants/Omega.js
index
7b5576c
..
5431198
100644
(file)
--- a/
client/src/variants/Omega.js
+++ b/
client/src/variants/Omega.js
@@
-228,6
+228,14
@@
export class OmegaRules extends ChessRules {
return res.slice(0, -1); //remove last comma
}
return res.slice(0, -1); //remove last comma
}
+ canTake([x1, y1], [x2, y2]) {
+ return (
+ // Cannot take wall :)
+ this.board[x2][y2] != V.NOTHING &&
+ this.getColor(x1, y1) !== this.getColor(x2, y2)
+ );
+ }
+
// En-passant after 2-sq or 3-sq jumps
getEpSquare(moveOrSquare) {
if (!moveOrSquare) return undefined;
// En-passant after 2-sq or 3-sq jumps
getEpSquare(moveOrSquare) {
if (!moveOrSquare) return undefined;