From: Benjamin Auder Date: Wed, 10 Feb 2021 12:35:05 +0000 (+0100) Subject: Backward compatibility for Ball variant (wildebeest) X-Git-Url: https://git.auder.net/app_dev.php/bundles/doc/html/css/index.css?a=commitdiff_plain;h=579916492b42a8a103090db52030391bc1860fa4;p=vchess.git Backward compatibility for Ball variant (wildebeest) --- diff --git a/client/public/images/pieces/Ball/bw.svg b/client/public/images/pieces/Ball/bw.svg new file mode 120000 index 00000000..ee01c996 --- /dev/null +++ b/client/public/images/pieces/Ball/bw.svg @@ -0,0 +1 @@ +../Wildebeest/bw.svg \ No newline at end of file diff --git a/client/public/images/pieces/Ball/ww.svg b/client/public/images/pieces/Ball/ww.svg new file mode 120000 index 00000000..a994c13c --- /dev/null +++ b/client/public/images/pieces/Ball/ww.svg @@ -0,0 +1 @@ +../Wildebeest/ww.svg \ No newline at end of file diff --git a/client/src/variants/Ball.js b/client/src/variants/Ball.js index fb2172b1..8f6493a3 100644 --- a/client/src/variants/Ball.js +++ b/client/src/variants/Ball.js @@ -137,7 +137,7 @@ export class BallRules extends ChessRules { const withPrefix = Object.keys(V.HAS_BALL_DECODE) .concat([V.PHOENIX]) - .concat(['a']); + .concat(['a', 'w']); //TODO: 'w' for backward compatibility - to remove if (withPrefix.includes(b[1])) prefix = "Ball/"; return prefix + b; }