Video Game Stores
#app
#ui
button#generate(
:disabled="interatingMapGen || snakeInitiating",
@click="initmapGrid"
) regen
#gameOver(:class="{ shown: gameOver }")
div Game Over
button(@click="initmapGrid") retry
#mapGrid(
:style="{ '--width': width, '--height': height, '--baseSnekColor': baseSnekColor, '--snekColorDirection': snekColorDirection }",
:class="{ mounted: true, interatingMapGen: interatingMapGen, slithering: slithering }"
)
.col(v-for="(rows, x) in mapGrid")
.square(
v-for="(square, y) in rows",
:key="`${x}-${y}`",
:class="{ filled: mapGrid[x][y], fruit: fruit.x === x && fruit.y === y, 'snake-item': fruit.x === x && fruit.y === y, snake: snakeMap[x][y] }",
:style="{ '--snekColor': snakeMap[x][y] !== false && slithering ? Math.abs(snakeMap[x][y] - snakeIndex) : 0, '--snekX': x, '--snekY': y }",
:data-pos="`${x}-${y}`"
)