- Rename and restructure components and assets for uniformity.

- Refactor `Field.vue` for better state management and event handling.
- Update path references for SVG assets.
- Add selection highlighting in game field with red and white arrows.
- Simplify and organize styles in game components.
- Minor updates to local mode game logic (`LocalMode.vue`).
This commit is contained in:
2026-02-19 17:43:22 +01:00
committed by Jonas
parent 2337c6b2db
commit 13fdf97f5a
9 changed files with 118 additions and 67 deletions
+17 -12
View File
@@ -1,20 +1,25 @@
<script setup lang="ts">
import Field from '@/components/Game/Field.vue';
import Field from '@/components/game/Field.vue'
import { ref } from 'vue'
const gameField = [
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 2, 1],
[1, 0, 0, 0, 0, 1, 1],
[1, 0, 2, 0, 1, 2, 2],
[1, 1, 2, 1, 2, 1, 2],
];
let gameField = [
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 2, 1],
[1, 0, 1, 0, 0, 1, 1],
[1, 0, 2, 0, 1, 2, 2],
[1, 1, 2, 1, 2, 1, 2],
]
let currentSelection = ref(null)
setInterval(() => {
console.log(currentSelection.value)
}, 1000)
</script>
<template>
<Field :game-state="gameField"></Field>
<Field :game-state="gameField" v-model:current-selection-index="currentSelection" ></Field>
</template>
<style scoped>
</style>
<style scoped></style>