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
/
Antiking.js
diff --git
a/public/javascripts/variants/Antiking.js
b/public/javascripts/variants/Antiking.js
index
e4d402c
..
25a9dfc
100644
(file)
--- a/
public/javascripts/variants/Antiking.js
+++ b/
public/javascripts/variants/Antiking.js
@@
-113,8
+113,8
@@
class AntikingRules extends ChessRules
updateVariables(move)
{
super.updateVariables(move);
updateVariables(move)
{
super.updateVariables(move);
- const piece =
this.getPiece(move.start.x,move.start.y)
;
- const c =
this.getColor(move.start.x,move.start.y)
;
+ const piece =
move.vanish[0].p
;
+ const c =
move.vanish[0].c
;
// Update antiking position
if (piece == V.ANTIKING)
{
// Update antiking position
if (piece == V.ANTIKING)
{
@@
-126,8
+126,8
@@
class AntikingRules extends ChessRules
unupdateVariables(move)
{
super.unupdateVariables(move);
unupdateVariables(move)
{
super.unupdateVariables(move);
- const c =
this.getColor(move.start.x,move.start.y)
;
- if (
this.getPiece(move.start.x,move.start.y)
== V.ANTIKING)
+ const c =
move.vanish[0].c
;
+ if (
move.vanish[0].p
== V.ANTIKING)
this.antikingPos[c] = [move.start.x, move.start.y];
}
this.antikingPos[c] = [move.start.x, move.start.y];
}