From 6fba6e0c029afc74a780ef845a02659da53c84e0 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Fri, 28 Jun 2019 16:59:14 +0200 Subject: [PATCH] Refactor, forget about 3 or 4 players games --- client/src/data/nbPlayers.js | 21 ---- client/src/views/Game.vue | 221 ++++++++++++++++------------------- client/src/views/Hall.vue | 123 +++++-------------- server/routes/challenges.js | 22 ++-- server/sockets.js | 15 --- 5 files changed, 137 insertions(+), 265 deletions(-) delete mode 100644 client/src/data/nbPlayers.js diff --git a/client/src/data/nbPlayers.js b/client/src/data/nbPlayers.js deleted file mode 100644 index 2f58d168..00000000 --- a/client/src/data/nbPlayers.js +++ /dev/null @@ -1,21 +0,0 @@ -export const NbPlayers = -{ - "Alice": [2,3,4], - "Antiking": [2,3,4], - "Atomic": [2,3,4], - "Baroque": [2,3,4], - "Berolina": [2,4], - "Checkered": [2,3,4], - "Chess960": [2,3,4], - "Crazyhouse": [2,3,4], - "Dark": [2,3,4], - "Extinction": [2,3,4], - "Grand": [2], - "Losers": [2,3,4], - "Magnetic": [2], - "Marseille": [2], - "Switching": [2,3,4], - "Upsidedown": [2], - "Wildebeest": [2], - "Zen": [2,3,4], -}; diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index 96c711b6..7d20dbe0 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -11,7 +11,7 @@ button(@click="abortGame") {{ st.tr["Game is too boring"] }} BaseGame(:game="game" :vr="vr" ref="basegame" @newmove="processMove" @gameover="gameOver") - // TODO: show players names + clocks state + // TODO: also show players names div Time: {{ virtualClocks[0] }} - {{ virtualClocks[1] }} .button-group(v-if="game.mode!='analyze' && game.score=='*'") button(@click="offerDraw") Draw @@ -24,12 +24,18 @@