projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare some more variants (unfinished)
[vchess.git]
/
public
/
javascripts
/
variants
/
Wildebeest.js
diff --git
a/public/javascripts/variants/Wildebeest.js
b/public/javascripts/variants/Wildebeest.js
index
783eb44
..
ef3779a
100644
(file)
--- a/
public/javascripts/variants/Wildebeest.js
+++ b/
public/javascripts/variants/Wildebeest.js
@@
-159,13
+159,12
@@
class WildebeestRules extends ChessRules
// TODO: some redundant checks
if (epsq.x == x+shift && Math.abs(epsq.y - y) == 1)
{
// TODO: some redundant checks
if (epsq.x == x+shift && Math.abs(epsq.y - y) == 1)
{
- let epStep = epsq.y - y;
- var enpassantMove = this.getBasicMove([x,y], [x+shift,y+epStep]);
+ var enpassantMove = this.getBasicMove([x,y], [x+shift,epsq.y]);
enpassantMove.vanish.push({
x: x,
enpassantMove.vanish.push({
x: x,
- y:
y+epStep
,
+ y:
epsq.y
,
p: 'p',
p: 'p',
- c: this.getColor(x,
y+epStep
)
+ c: this.getColor(x,
epsq.y
)
});
moves.push(enpassantMove);
}
});
moves.push(enpassantMove);
}