From 6b77c0ff26eeb7481c4540297a21f379f5487834 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 12 Dec 2020 14:38:25 -0700 Subject: [PATCH] Remove all the repeated text inputs and instead use a for loop. --- web/src/components/GameBoard.vue | 250 +++---------------------------- 1 file changed, 17 insertions(+), 233 deletions(-) diff --git a/web/src/components/GameBoard.vue b/web/src/components/GameBoard.vue index b3bac03..706103a 100644 --- a/web/src/components/GameBoard.vue +++ b/web/src/components/GameBoard.vue @@ -3,126 +3,18 @@

{{ $store.getters.otherTeamName }} Answers

-
- - +
+ + - {{ $store.state[`team_${3 - $store.state.team}`].eyes[1] }} x - - reveal another letter - -
-
- - - - {{ $store.state[`team_${3 - $store.state.team}`].eyes[2] }}x - - reveal another letter - -
-
- - - - {{ $store.state[`team_${3 - $store.state.team}`].eyes[3] }} x - - reveal another letter - -
-
- - - - {{ $store.state[`team_${3 - $store.state.team}`].eyes[4] }} x - - reveal another letter - -
-
- - - - {{ $store.state[`team_${3 - $store.state.team}`].eyes[5] }} x - - reveal another letter - -
-
- - - - {{ $store.state[`team_${3 - $store.state.team}`].eyes[6] }} x - - reveal another letter - -
-
- - - - {{ $store.state[`team_${3 - $store.state.team}`].eyes[7] }} x - - reveal another letter - -
-
- - - - {{ $store.state[`team_${3 - $store.state.team}`].eyes[8] }} x + {{ $store.state[`team_${3 - $store.state.team}`].eyes[answerIndex] }} x

{{ $store.getters.teamName }} Answers

-
+
- + reveal another letter - x {{ $store.state[`team_${$store.state.team}`].eyes[1] }} - - -
-
- - - reveal another letter - - x {{ $store.state[`team_${$store.state.team}`].eyes[2] }} - - -
-
- - - reveal another letter - - x {{ $store.state[`team_${$store.state.team}`].eyes[3] }} - - -
-
- - - reveal another letter - - x {{ $store.state[`team_${$store.state.team}`].eyes[4] }} - - -
-
- - - reveal another letter - - x {{ $store.state[`team_${$store.state.team}`].eyes[5] }} - - -
-
- - - reveal another letter - - x {{ $store.state[`team_${$store.state.team}`].eyes[6] }} - - -
-
- - - reveal another letter - - x {{ $store.state[`team_${$store.state.team}`].eyes[7] }} - - -
-
- - - reveal another letter - - x {{ $store.state[`team_${$store.state.team}`].eyes[8] }} + x {{ $store.state[`team_${$store.state.team}`].eyes[answerIndex] }}