Files
KnockOutWhist-Web/knockoutwhistweb/public/javascripts/interact.js
LQ63 5eb0eac39e feat(api): Vue
Changed ingame JQuery to Vue Components, Started changing lobby to vue components
2025-12-04 01:32:17 +01:00

32 lines
753 B
JavaScript

/*
function handlePlayCard(cardidx) {}
*/
function handleSkipDogLife(button) {
// TODO needs implementation
}
function startGame() {
sendEvent("StartGame")
}
function handleTrumpSelection(object) {
const $button = $(object);
const trumpIndex = parseInt($button.data('trump'));
const payload = {
suitIndex: trumpIndex
}
sendEvent("PickTrumpsuit", payload)
}
function handleKickPlayer(playerId) {
sendEvent("KickPlayer", {
playerId: playerId
})
}
function handleReturnToLobby() {
sendEvent("ReturnToLobby")
}
globalThis.startGame = startGame
globalThis.handleTrumpSelection = handleTrumpSelection
globalThis.handleKickPlayer = handleKickPlayer
globalThis.handleReturnToLobby = handleReturnToLobby