projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Ultima when no moves are available
[vchess.git]
/
public
/
javascripts
/
variants
/
Ultima.js
diff --git
a/public/javascripts/variants/Ultima.js
b/public/javascripts/variants/Ultima.js
index
1db3691
..
7f9531e
100644
(file)
--- a/
public/javascripts/variants/Ultima.js
+++ b/
public/javascripts/variants/Ultima.js
@@
-368,12
+368,6
@@
class UltimaRules extends ChessRules
V.steps[V.ROOK].concat(V.steps[V.BISHOP]), "oneStep");
}
V.steps[V.ROOK].concat(V.steps[V.BISHOP]), "oneStep");
}
- // TODO: verify this assertion
- atLeastOneMove()
- {
- return true; //always at least one possible move
- }
-
underCheck(move)
{
return false; //there is no check
underCheck(move)
{
return false; //there is no check
@@
-440,7
+434,6
@@
class UltimaRules extends ChessRules
return "1/2";
const color = this.turn;
return "1/2";
const color = this.turn;
- // TODO: do we need "atLeastOneMove()"?
if (this.atLeastOneMove() && this.kingPos[color][0] >= 0)
return "*";
if (this.atLeastOneMove() && this.kingPos[color][0] >= 0)
return "*";
@@
-449,7
+442,7
@@
class UltimaRules extends ChessRules
checkGameEnd()
{
checkGameEnd()
{
- //
No valid move:
our king disappeared
+ //
Stalemate, or
our king disappeared
return this.turn == "w" ? "0-1" : "1-0";
}
return this.turn == "w" ? "0-1" : "1-0";
}