<template>
<div>
<button @click="start">Старт</button>
<pre>{{ player }}</pre>
</div>
</template>
<script setup lang="ts">
import {startGame} from "~/composables/startGame";
import {Player} from "~/interfaces/player";
const player: { value: Player | null } = ref(null);
const start = () => {
player.value = startGame()
}
</script>
<template>
<div>
<button @click="start">Старт</button>
<pre>{{ player }}</pre>
</div>
</template>
<script setup lang="ts">
import {startGame} from "~/composables/startGame";
import {Player} from "~/interfaces/player";
const player: { value: Player | null } = ref(null);
const start = () => {
player.value = startGame()
}
</script>