projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove some redundant code [Checkered/Magnetic still buggish]
[vchess.git]
/
public
/
javascripts
/
variants
/
Atomic.js
diff --git
a/public/javascripts/variants/Atomic.js
b/public/javascripts/variants/Atomic.js
index
f32e21d
..
2b7b1ac
100644
(file)
--- a/
public/javascripts/variants/Atomic.js
+++ b/
public/javascripts/variants/Atomic.js
@@
-72,7
+72,7
@@
class AtomicRules extends ChessRules
&& Math.abs(this.kingPos[c][1]-move.end.y) <= 1)
{
this.kingPos[c] = [-1,-1];
&& Math.abs(this.kingPos[c][1]-move.end.y) <= 1)
{
this.kingPos[c] = [-1,-1];
- this.
f
lags[c] = [false,false];
+ this.
castleF
lags[c] = [false,false];
}
// Did we explode opponent king ?
}
// Did we explode opponent king ?
@@
-80,7
+80,7
@@
class AtomicRules extends ChessRules
&& Math.abs(this.kingPos[oppCol][1]-move.end.y) <= 1)
{
this.kingPos[oppCol] = [-1,-1];
&& Math.abs(this.kingPos[oppCol][1]-move.end.y) <= 1)
{
this.kingPos[oppCol] = [-1,-1];
- this.
f
lags[oppCol] = [false,false];
+ this.
castleF
lags[oppCol] = [false,false];
}
else
{
}
else
{
@@
-88,9
+88,9
@@
class AtomicRules extends ChessRules
if (Math.abs(move.end.x-oppFirstRank) <= 1)
{
if (Math.abs(move.end.y-this.INIT_COL_ROOK[oppCol][0]) <= 1)
if (Math.abs(move.end.x-oppFirstRank) <= 1)
{
if (Math.abs(move.end.y-this.INIT_COL_ROOK[oppCol][0]) <= 1)
- this.
f
lags[oppCol][0] = false;
+ this.
castleF
lags[oppCol][0] = false;
if (Math.abs(move.end.y-this.INIT_COL_ROOK[oppCol][1]) <= 1)
if (Math.abs(move.end.y-this.INIT_COL_ROOK[oppCol][1]) <= 1)
- this.
f
lags[oppCol][1] = false;
+ this.
castleF
lags[oppCol][1] = false;
}
}
}
}
}
}