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
/
Ultima.js
diff --git
a/public/javascripts/variants/Ultima.js
b/public/javascripts/variants/Ultima.js
index
7f4a7eb
..
0b00c26
100644
(file)
--- a/
public/javascripts/variants/Ultima.js
+++ b/
public/javascripts/variants/Ultima.js
@@
-1,8
+1,8
@@
class UltimaRules extends ChessRules
{
class UltimaRules extends ChessRules
{
- static get HasFlags { return false; }
+ static get HasFlags
()
{ return false; }
- static get HasEnpassant { return false; }
+ static get HasEnpassant
()
{ return false; }
static getPpath(b)
{
static getPpath(b)
{
@@
-529,8
+529,8
@@
class UltimaRules extends ChessRules
updateVariables(move)
{
// Just update king(s) position(s)
updateVariables(move)
{
// Just update king(s) position(s)
- 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
;
if (piece == V.KING && move.appear.length > 0)
{
this.kingPos[c][0] = move.appear[0].x;
if (piece == V.KING && move.appear.length > 0)
{
this.kingPos[c][0] = move.appear[0].x;
@@
-626,3
+626,5
@@
class UltimaRules extends ChessRules
return notation;
}
}
return notation;
}
}
+
+const VariantRules = UltimaRules;