From e71161fbfffe53b0f4b174e0467cdd98cc70b7b0 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Fri, 28 Feb 2020 00:41:50 +0100 Subject: [PATCH] Implemented multi-move possibility in a moves list => better support for multi-moves variants --- client/public/images/pieces/Check3/bk_1.svg | 16 + client/public/images/pieces/Check3/bk_2.svg | 16 + client/public/images/pieces/Check3/bk_3.svg | 16 + client/public/images/pieces/Check3/wk_1.svg | 15 + client/public/images/pieces/Check3/wk_2.svg | 15 + client/public/images/pieces/Check3/wk_3.svg | 15 + client/src/base_rules.js | 2 +- client/src/components/BaseGame.vue | 280 +++++++++++------ client/src/components/ComputerGame.vue | 51 +-- client/src/components/MoveList.vue | 124 ++------ client/src/components/UpsertUser.vue | 2 +- client/src/playCompMove.js | 6 +- client/src/translations/about/en.pug | 1 + client/src/translations/about/es.pug | 1 + client/src/translations/about/fr.pug | 1 + client/src/utils/notation.js | 12 + client/src/utils/playUndo.js | 23 ++ client/src/variants/Check3.js | 79 ++++- client/src/variants/Hidden.js | 24 +- client/src/variants/Marseille.js | 35 +-- client/src/variants/Wormhole.js | 324 ++------------------ client/src/views/Game.vue | 270 ++++++++-------- client/src/views/Problems.vue | 5 +- 23 files changed, 618 insertions(+), 715 deletions(-) create mode 100644 client/public/images/pieces/Check3/bk_1.svg create mode 100644 client/public/images/pieces/Check3/bk_2.svg create mode 100644 client/public/images/pieces/Check3/bk_3.svg create mode 100644 client/public/images/pieces/Check3/wk_1.svg create mode 100644 client/public/images/pieces/Check3/wk_2.svg create mode 100644 client/public/images/pieces/Check3/wk_3.svg create mode 100644 client/src/utils/notation.js create mode 100644 client/src/utils/playUndo.js diff --git a/client/public/images/pieces/Check3/bk_1.svg b/client/public/images/pieces/Check3/bk_1.svg new file mode 100644 index 00000000..04043f81 --- /dev/null +++ b/client/public/images/pieces/Check3/bk_1.svg @@ -0,0 +1,16 @@ + + + Layer 1 + + + + + + + + + + + + + diff --git a/client/public/images/pieces/Check3/bk_2.svg b/client/public/images/pieces/Check3/bk_2.svg new file mode 100644 index 00000000..cc5b2aa6 --- /dev/null +++ b/client/public/images/pieces/Check3/bk_2.svg @@ -0,0 +1,16 @@ + + + Layer 1 + + + + + + + + + + + + + diff --git a/client/public/images/pieces/Check3/bk_3.svg b/client/public/images/pieces/Check3/bk_3.svg new file mode 100644 index 00000000..21887b94 --- /dev/null +++ b/client/public/images/pieces/Check3/bk_3.svg @@ -0,0 +1,16 @@ + + + Layer 1 + + + + + + + + + + + + + diff --git a/client/public/images/pieces/Check3/wk_1.svg b/client/public/images/pieces/Check3/wk_1.svg new file mode 100644 index 00000000..5b66331a --- /dev/null +++ b/client/public/images/pieces/Check3/wk_1.svg @@ -0,0 +1,15 @@ + + + Layer 1 + + + + + + + + + + + + diff --git a/client/public/images/pieces/Check3/wk_2.svg b/client/public/images/pieces/Check3/wk_2.svg new file mode 100644 index 00000000..25c8d51b --- /dev/null +++ b/client/public/images/pieces/Check3/wk_2.svg @@ -0,0 +1,15 @@ + + + Layer 1 + + + + + + + + + + + + diff --git a/client/public/images/pieces/Check3/wk_3.svg b/client/public/images/pieces/Check3/wk_3.svg new file mode 100644 index 00000000..198c27cf --- /dev/null +++ b/client/public/images/pieces/Check3/wk_3.svg @@ -0,0 +1,15 @@ + + + Layer 1 + + + + + + + + + + + + diff --git a/client/src/base_rules.js b/client/src/base_rules.js index db9b981a..e6fd6d73 100644 --- a/client/src/base_rules.js +++ b/client/src/base_rules.js @@ -1126,7 +1126,7 @@ export const ChessRules = class ChessRules { let moves1 = this.getAllValidMoves("computer"); if (moves1.length == 0) - //TODO: this situation should not happen + // TODO: this situation should not happen return null; // Can I mate in 1 ? (for Magnetic & Extinction) diff --git a/client/src/components/BaseGame.vue b/client/src/components/BaseGame.vue index 3573643d..488567b5 100644 --- a/client/src/components/BaseGame.vue +++ b/client/src/components/BaseGame.vue @@ -1,10 +1,5 @@