import { defineStore } from 'pinia' import { Players } from '@/composables/engine.d'; export const usePlayersStore = defineStore('PlayersStore', { state: () => { return { players: [] as Players, } }, actions: { setPlayers(players: Players): void { players = players || [] this.players.splice(0, this.players.length, ...players) }, reset(): void { this.players.splice(0, 0) }, }, })