projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename getOppCol into static GetOppCol + start thinking about problems page
[vchess.git]
/
public
/
javascripts
/
variants
/
Antiking.js
diff --git
a/public/javascripts/variants/Antiking.js
b/public/javascripts/variants/Antiking.js
index
ed69ab7
..
45daa62
100644
(file)
--- a/
public/javascripts/variants/Antiking.js
+++ b/
public/javascripts/variants/Antiking.js
@@
-90,7
+90,7
@@
class AntikingRules extends ChessRules
underCheck(color)
{
underCheck(color)
{
- const oppCol =
this.g
etOppCol(color);
+ const oppCol =
V.G
etOppCol(color);
let res = this.isAttacked(this.kingPos[color], [oppCol])
|| !this.isAttacked(this.antikingPos[color], [oppCol]);
return res;
let res = this.isAttacked(this.kingPos[color], [oppCol])
|| !this.isAttacked(this.antikingPos[color], [oppCol]);
return res;
@@
-99,7
+99,7
@@
class AntikingRules extends ChessRules
getCheckSquares(color)
{
let res = super.getCheckSquares(color);
getCheckSquares(color)
{
let res = super.getCheckSquares(color);
- if (!this.isAttacked(this.antikingPos[color], [
this.g
etOppCol(color)]))
+ if (!this.isAttacked(this.antikingPos[color], [
V.G
etOppCol(color)]))
res.push(JSON.parse(JSON.stringify(this.antikingPos[color])));
return res;
}
res.push(JSON.parse(JSON.stringify(this.antikingPos[color])));
return res;
}
@@
-128,7
+128,7
@@
class AntikingRules extends ChessRules
checkGameEnd()
{
const color = this.turn;
checkGameEnd()
{
const color = this.turn;
- const oppCol =
this.g
etOppCol(color);
+ const oppCol =
V.G
etOppCol(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]))
{