projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Attempt to not throw exception on server socket error
[vchess.git]
/
public
/
javascripts
/
variants
/
Loser.js
diff --git
a/public/javascripts/variants/Loser.js
b/public/javascripts/variants/Loser.js
index
0ed3edc
..
936c259
100644
(file)
--- a/
public/javascripts/variants/Loser.js
+++ b/
public/javascripts/variants/Loser.js
@@
-2,13
+2,15
@@
class LoserRules extends ChessRules
{
initVariables(fen)
{
{
initVariables(fen)
{
- // No castling, hence no flags; but flags defined for compatibility
- this.flags = "-";
const epSq = this.moves.length > 0 ? this.getEpSquare(this.lastMove) : undefined;
this.epSquares = [ epSq ];
}
const epSq = this.moves.length > 0 ? this.getEpSquare(this.lastMove) : undefined;
this.epSquares = [ epSq ];
}
- setFlags(fen) { }
+ setFlags(fen)
+ {
+ // No castling, hence no flags; but flags defined for compatibility
+ this.castleFlags = { "w":[false,false], "b":[false,false] };
+ }
getPotentialPawnMoves([x,y])
{
getPotentialPawnMoves([x,y])
{
@@
-108,6
+110,11
@@
class LoserRules extends ChessRules
unupdateVariables(move) { }
parseFlags(flags) { }
unupdateVariables(move) { }
parseFlags(flags) { }
+ getFlagsFen()
+ {
+ return "";
+ }
+
checkGameEnd()
{
// No valid move: you win!
checkGameEnd()
{
// No valid move: you win!