projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implemented and tested DarkChess. Berolina, Upsidedown should be OK. Marseille: TODO
[vchess.git]
/
public
/
javascripts
/
variants
/
Atomic.js
diff --git
a/public/javascripts/variants/Atomic.js
b/public/javascripts/variants/Atomic.js
index
0275805
..
666c50b
100644
(file)
--- a/
public/javascripts/variants/Atomic.js
+++ b/
public/javascripts/variants/Atomic.js
@@
-58,7
+58,7
@@
class AtomicRules extends ChessRules
updateVariables(move)
{
super.updateVariables(move);
updateVariables(move)
{
super.updateVariables(move);
- const color =
this.getColor(move.start.x,move.start.y)
;
+ const color =
move.vanish[0].c
;
if (move.appear.length == 0) //capture
{
const firstRank = {"w": 7, "b": 0};
if (move.appear.length == 0) //capture
{
const firstRank = {"w": 7, "b": 0};
@@
-89,7
+89,7
@@
class AtomicRules extends ChessRules
unupdateVariables(move)
{
super.unupdateVariables(move);
unupdateVariables(move)
{
super.unupdateVariables(move);
- const c =
this.getColor(move.start.x,move.start.y)
;
+ const c =
move.vanish[0].c
;
const oppCol = this.getOppCol(c);
if ([this.kingPos[c][0],this.kingPos[oppCol][0]].some(e => { return e < 0; }))
{
const oppCol = this.getOppCol(c);
if ([this.kingPos[c][0],this.kingPos[oppCol][0]].some(e => { return e < 0; }))
{