projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplified underCheck / getCheckSquares logic. Debugging Berolina
[vchess.git]
/
public
/
javascripts
/
variants
/
Upsidedown.js
diff --git
a/public/javascripts/variants/Upsidedown.js
b/public/javascripts/variants/Upsidedown.js
index
aa9a696
..
f966899
100644
(file)
--- a/
public/javascripts/variants/Upsidedown.js
+++ b/
public/javascripts/variants/Upsidedown.js
@@
-1,7
+1,15
@@
-class UpsidedownRules extends ChessR
U
les
+class UpsidedownRules extends ChessR
u
les
{
static HasFlags() { return false; }
{
static HasFlags() { return false; }
+ // Forbid two knights moves in a row at moves 1 and 2
+ getPotentialKnightMoves(sq)
+ {
+ // But this will also affect FEN for problems, and...
+ // does it really solve the problem ?
+ //if (this.moves. ...)
+ }
+
getPotentialKingMoves(sq)
{
// No castle
getPotentialKingMoves(sq)
{
// No castle
@@
-47,9
+55,9
@@
class UpsidedownRules extends ChessRUles
pieces[c][knight2Pos] = 'n';
pieces[c][rook2Pos] = 'r';
}
pieces[c][knight2Pos] = 'n';
pieces[c][rook2Pos] = 'r';
}
- return pieces["w"].join("") +
+ return pieces["w"].join("")
.toUpperCase()
+
"/PPPPPPPP/8/8/8/8/pppppppp/" +
"/PPPPPPPP/8/8/8/8/pppppppp/" +
- pieces["b"].join("")
.toUpperCase()
+
+ pieces["b"].join("") +
" w 1111 -"; //add turn + flags + enpassant
}
}
" w 1111 -"; //add turn + flags + enpassant
}
}