projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A few fixes, and write rules for Grand + Wildebeest
[vchess.git]
/
public
/
javascripts
/
variants
/
Antiking.js
diff --git
a/public/javascripts/variants/Antiking.js
b/public/javascripts/variants/Antiking.js
index
f8c7465
..
84f774a
100644
(file)
--- a/
public/javascripts/variants/Antiking.js
+++ b/
public/javascripts/variants/Antiking.js
@@
-92,8
+92,8
@@
class AntikingRules extends ChessRules
const c = this.turn;
const oppCol = this.getOppCol(c);
this.play(move)
const c = this.turn;
const oppCol = this.getOppCol(c);
this.play(move)
- let res = this.isAttacked(this.kingPos[c],
oppCol
)
- || !this.isAttacked(this.antikingPos[c],
oppCol
);
+ let res = this.isAttacked(this.kingPos[c],
[oppCol]
)
+ || !this.isAttacked(this.antikingPos[c],
[oppCol]
);
this.undo(move);
return res;
}
this.undo(move);
return res;
}
@@
-103,7
+103,7
@@
class AntikingRules extends ChessRules
let res = super.getCheckSquares(move);
this.play(move);
const c = this.turn;
let res = super.getCheckSquares(move);
this.play(move);
const c = this.turn;
- if (!this.isAttacked(this.antikingPos[c],
this.getOppCol(c)
))
+ if (!this.isAttacked(this.antikingPos[c],
[this.getOppCol(c)]
))
res.push(JSON.parse(JSON.stringify(this.antikingPos[c])));
this.undo(move);
return res;
res.push(JSON.parse(JSON.stringify(this.antikingPos[c])));
this.undo(move);
return res;
@@
-134,8
+134,8
@@
class AntikingRules extends ChessRules
{
const color = this.turn;
const oppCol = this.getOppCol(color);
{
const color = this.turn;
const oppCol = this.getOppCol(color);
- if (!this.isAttacked(this.kingPos[color],
oppCol
)
- && this.isAttacked(this.antikingPos[color],
oppCol
))
+ if (!this.isAttacked(this.kingPos[color],
[oppCol]
)
+ && this.isAttacked(this.antikingPos[color],
[oppCol]
))
{
return "1/2";
}
{
return "1/2";
}