// pages/gameplay.vue
.gameplay
.info-row
.info-column Current Player: {{ currentPlayerName }}
.info-column Current Turn: {{ currentTurn }} / {{ totalTurns }}
.info-column Current Iteration: {{ currentIteration }} / {{ totalIterations }}
.symbol-frame
div.spinning-symbols(v-if="isSpinning")
img(v-for="symbol in spinningSymbols" :key="symbol.name" :src="symbol.path" :alt="symbol.name")
img(v-if="currentSymbol" :src="currentSymbol.path" :alt="currentSymbol.name")
p(v-if="!currentSymbol") ?
.controls
button(@click="randomizeSymbol" :disabled="(isIterationEnd || isGameFinished)") Get Symbol
button(@click="nextPlayer" :disabled="!isIterationEnd || isGameFinished") Next Player
.player-info
table
tr(v-for="(player, index) in players" :key="index" :class="{ 'current-player': currentPlayer === index + 1 }")
td.player
button.edit(@click="player.isEditing = !player.isEditing")
img.edit(v-if="!player.isEditing" src="~/assets/icons/pen.svg" alt="Edit" width="16" height="8")
img.edit(v-if="player.isEditing" src="~/assets/icons/floppy.svg" alt="Edit" width="16" height="8")
input.edit(v-if="player.isEditing" v-model="player.name" @blur="player.isEditing = false")
span(v-else @click="player.isEditing = true") {{ player.name }}
td.symbols-cell
img(v-for="(symbol, index) in player.symbols" :key="index" :src="symbol.path" :alt="symbol.name")
.game-over(v-if="isGameFinished")
h2 There are no turns left
button(@click="exitGame") Play Again
.exit-game(v-else)
button(@click="exitGame") Exit Game