From 579916492b42a8a103090db52030391bc1860fa4 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Wed, 10 Feb 2021 13:35:05 +0100
Subject: [PATCH] Backward compatibility for Ball variant (wildebeest)

---
 client/public/images/pieces/Ball/bw.svg | 1 +
 client/public/images/pieces/Ball/ww.svg | 1 +
 client/src/variants/Ball.js             | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)
 create mode 120000 client/public/images/pieces/Ball/bw.svg
 create mode 120000 client/public/images/pieces/Ball/ww.svg

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;
   }
-- 
2.48.1