X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fvariants%2FUpsidedown.js;h=f9668997f02eda6ec5ef2df6e68b7b8db26daa97;hb=f6dbe8e31a3260487664f1e0b50710b3f3efaf5f;hp=aa9a696dd0c6fddbf136bbdd9447a3f3dff0d311;hpb=388e4c401f05b1f6a4c54e33c9da9114969a53c0;p=vchess.git diff --git a/public/javascripts/variants/Upsidedown.js b/public/javascripts/variants/Upsidedown.js index aa9a696d..f9668997 100644 --- a/public/javascripts/variants/Upsidedown.js +++ b/public/javascripts/variants/Upsidedown.js @@ -1,7 +1,15 @@ -class UpsidedownRules extends ChessRUles +class UpsidedownRules extends ChessRules { 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 @@ -47,9 +55,9 @@ class UpsidedownRules extends ChessRUles pieces[c][knight2Pos] = 'n'; pieces[c][rook2Pos] = 'r'; } - return pieces["w"].join("") + + return pieces["w"].join("").toUpperCase() + "/PPPPPPPP/8/8/8/8/pppppppp/" + - pieces["b"].join("").toUpperCase() + + pieces["b"].join("") + " w 1111 -"; //add turn + flags + enpassant } }