From: Benjamin Auder Date: Wed, 19 Dec 2018 21:46:19 +0000 (+0100) Subject: Final fixes in variants X-Git-Url: https://git.auder.net/variants/img/pieces/css/doc/mini-custom.min.css?a=commitdiff_plain;h=d7f69b872a24a3b0a9dc780db3be215261a94de4;p=vchess.git Final fixes in variants --- diff --git a/public/javascripts/variants/Grand.js b/public/javascripts/variants/Grand.js index 22b24948..12fbfdb2 100644 --- a/public/javascripts/variants/Grand.js +++ b/public/javascripts/variants/Grand.js @@ -27,11 +27,6 @@ class GrandRules extends ChessRules ); } - static GenRandInitFen() - { - return ChessRules.GenRandInitFen() + " 0000000000"; - } - getFen() { return super.getFen() + " " + this.getCapturedFen(); @@ -363,7 +358,7 @@ class GrandRules extends ChessRules return pieces["b"].join("") + "/pppppppppp/10/10/10/10/10/10/PPPPPPPPPP/" + pieces["w"].join("").toUpperCase() + - " w 1111 -"; + " w 1111 - 0000000000"; } } diff --git a/public/javascripts/variants/Loser.js b/public/javascripts/variants/Loser.js index 6731d322..407c6aad 100644 --- a/public/javascripts/variants/Loser.js +++ b/public/javascripts/variants/Loser.js @@ -2,16 +2,6 @@ class LoserRules extends ChessRules { static get HasFlags() { return false; } - setOtherVariables(fen) - { - const parsedFen = V.ParseFen(fen); - const epSq = parsedFen.enpassant != "-" - ? V.SquareToCoords(parsedFen.enpassant) - : undefined; - this.epSquares = [ epSq ]; - this.scanKingsRooks(fen); - } - getPotentialPawnMoves([x,y]) { let moves = super.getPotentialPawnMoves([x,y]); diff --git a/public/javascripts/variants/Magnetic.js b/public/javascripts/variants/Magnetic.js index 6682b270..c4995dd3 100644 --- a/public/javascripts/variants/Magnetic.js +++ b/public/javascripts/variants/Magnetic.js @@ -2,14 +2,6 @@ class MagneticRules extends ChessRules { static get HasEnpassant() { return false; } - setOtherVariables(fen) - { - // No en-passant: - const parsedFen = V.ParseFen(fen); - this.setFlags(fenParsed.flags); - this.scanKingsRooks(fen); - } - getPotentialMovesFrom([x,y]) { let standardMoves = super.getPotentialMovesFrom([x,y]); diff --git a/views/rules/Magnetic.pug b/views/rules/Magnetic.pug index a86ebaec..20b5fe08 100644 --- a/views/rules/Magnetic.pug +++ b/views/rules/Magnetic.pug @@ -33,6 +33,8 @@ p. change anything on the board. They also block magnetic actions which go in their direction. +p Castling is possible, but no en-passant captures. + h3 End of the game p Win by capturing opponent's king. There is no notion of check or stalemate here.