import { defineStore } from 'pinia'

export const useGameStore = defineStore('game', {
  state: () => ({
    isDoubleMode: false,
    doubleEndTime: 0,
  }),
  actions: {
    setDoubleMode(value: boolean) {
      this.isDoubleMode = value
      if (value) {
        this.doubleEndTime = Date.now() + 30000 // 30秒后的时间戳
      } else {
        this.doubleEndTime = 0
      }
    },
  },
})
