From: Benjamin Auder Date: Wed, 14 Apr 2021 17:33:59 +0000 (+0200) Subject: Special SVG for berolina pawns X-Git-Url: https://git.auder.net/variants/Chakart/doc/scripts/css/img/%7B%7B%20targetUrl%20%7D%7D?a=commitdiff_plain;h=c350b3e525b72509a4b717a513ccaa596f1fc515;p=vchess.git Special SVG for berolina pawns --- diff --git a/client/public/images/pieces/Antiking/bp.svg b/client/public/images/pieces/Antiking/bp.svg new file mode 120000 index 00000000..d73b1f5a --- /dev/null +++ b/client/public/images/pieces/Antiking/bp.svg @@ -0,0 +1 @@ +../Berolina/bp.svg \ No newline at end of file diff --git a/client/public/images/pieces/Antiking/wp.svg b/client/public/images/pieces/Antiking/wp.svg new file mode 120000 index 00000000..4ba4e2bd --- /dev/null +++ b/client/public/images/pieces/Antiking/wp.svg @@ -0,0 +1 @@ +../Berolina/wp.svg \ No newline at end of file diff --git a/client/public/images/pieces/Berolina/SOURCE b/client/public/images/pieces/Berolina/SOURCE new file mode 100644 index 00000000..5067a58e --- /dev/null +++ b/client/public/images/pieces/Berolina/SOURCE @@ -0,0 +1 @@ +https://greenchess.net/info.php?item=downloads diff --git a/client/public/images/pieces/Berolina/bp.svg b/client/public/images/pieces/Berolina/bp.svg new file mode 100644 index 00000000..7b2df989 --- /dev/null +++ b/client/public/images/pieces/Berolina/bp.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + diff --git a/client/public/images/pieces/Berolina/wp.svg b/client/public/images/pieces/Berolina/wp.svg new file mode 100644 index 00000000..e25862f4 --- /dev/null +++ b/client/public/images/pieces/Berolina/wp.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + diff --git a/client/src/variants/Antiking1.js b/client/src/variants/Antiking1.js index 781984f9..7876da63 100644 --- a/client/src/variants/Antiking1.js +++ b/client/src/variants/Antiking1.js @@ -30,7 +30,7 @@ export class Antiking1Rules extends BerolinaRules { } getPpath(b) { - return b[1] == "a" ? "Antiking/" + b : b; + return (['a', 'p'].includes(b[1]) ? "Antiking/" : "") + b; } static IsGoodPosition(position) { diff --git a/client/src/variants/Berolina.js b/client/src/variants/Berolina.js index 15a567ce..9b071d34 100644 --- a/client/src/variants/Berolina.js +++ b/client/src/variants/Berolina.js @@ -2,6 +2,10 @@ import { ChessRules } from "@/base_rules"; export class BerolinaRules extends ChessRules { + getPpath(b) { + return (b[1] == 'p' ? "Berolina/" : "") + b; + } + // En-passant after 2-sq jump getEpSquare(moveOrSquare) { if (!moveOrSquare) return undefined; diff --git a/client/src/variants/Diamond.js b/client/src/variants/Diamond.js index 658b7ad7..aedd15db 100644 --- a/client/src/variants/Diamond.js +++ b/client/src/variants/Diamond.js @@ -12,6 +12,10 @@ export class DiamondRules extends ChessRules { return false; } + getPpath(b) { + return (b[1] == 'p' ? "Berolina/" : "") + b; + } + static GenRandInitFen(options) { if (options.randomness == 0) return "krbp4/rqnp4/nbpp4/pppp4/4PPPP/4PPBN/4PNQR/4PBRK w 0";