Files
KnockOutWhist-Web/knockoutwhistweb/public/javascripts/interact.js
lq64 194df5691c feat: FRO-3 FRO-4 Added vue compontents to ingame and lobby (#100)
Added vue compontents to ingame and lobby.

Co-authored-by: LQ63 <lkhermann@web.de>
Reviewed-on: #100
Co-authored-by: lq64 <lq@blackhole.local>
Co-committed-by: lq64 <lq@blackhole.local>
2025-12-04 08:00:58 +01:00

33 lines
782 B
JavaScript

function handlePlayCard(cardidx) {
//TODO: Needs implementation
}
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