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
/
Alice.js
diff --git
a/public/javascripts/variants/Alice.js
b/public/javascripts/variants/Alice.js
index
f7d2fa1
..
1cbfccf
100644
(file)
--- a/
public/javascripts/variants/Alice.js
+++ b/
public/javascripts/variants/Alice.js
@@
-256,8
+256,8
@@
class AliceRules extends ChessRules
updateVariables(move)
{
super.updateVariables(move); //standard king
updateVariables(move)
{
super.updateVariables(move); //standard king
- 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
;
// "l" = Alice king
if (piece == "l")
{
// "l" = Alice king
if (piece == "l")
{
@@
-270,8
+270,8
@@
class AliceRules 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)
== "l")
+ const c =
move.vanish[0].c
;
+ if (
move.vanish[0].p
== "l")
this.kingPos[c] = [move.start.x, move.start.y];
}
this.kingPos[c] = [move.start.x, move.start.y];
}