52 lines
1.4 KiB
TypeScript

import { EngineContext } from '@/composables/useEngine'
import { useUserinfoStore } from "@/stores/UserinfoStore"
export async function collectQuotes(this: EngineContext): Promise<void> {
const userInfoStore = useUserinfoStore()
await this.callApi('/api/collectQuotes', {
g: userInfoStore.gameId,
})
}
export async function startGame(this: EngineContext): Promise<void> {
const userInfoStore = useUserinfoStore()
await this.callApi('/api/startGame', {
g: userInfoStore.gameId,
})
}
export async function continueGame(this: EngineContext): Promise<void> {
const userInfoStore = useUserinfoStore()
await this.callApi('/api/continueGame', {
g: userInfoStore.gameId,
})
}
export async function resetGame(this: EngineContext): Promise<void> {
const userInfoStore = useUserinfoStore()
await this.callApi('/api/resetGame', {
g: userInfoStore.gameId,
})
}
export async function finishGame(this: EngineContext): Promise<void> {
const userInfoStore = useUserinfoStore()
await this.callApi('/api/finishGame', {
g: userInfoStore.gameId,
})
}
export async function disableGame(this: EngineContext): Promise<void> {
const userInfoStore = useUserinfoStore()
await this.callApi('/api/disableGame', {
g: userInfoStore.gameId,
})
}
export async function removeGame(this: EngineContext): Promise<void> {
const userInfoStore = useUserinfoStore()
await this.callApi('/api/removeGame', {
g: userInfoStore.gameId,
})
}