Skip to main content

Events

document.addEventListener("DK-%event%", (e) => {console.log(e.detail)})

Call when :

  • join - Player joins the DK game - Player that joined
  • left - a Player leaves - Player that left
  • start - 4 players are connected a the game is started
  • announcemented - you announcemented
  • turnToAnnouncement - its your turn to announce - string[] list of possible announcements you can make
  • cardPlayed - a played played a card - Card that was played Player that played the card
  • turn- its your turn to play a card - Player your player
  • winTrick- a player wins a trick - Player the player that won the trick
  • endGame- the game ended - teamOneGamePoints, teamTwoGamePoints, teamOnePoints, teamTwoPoints, teamWithMostPoints list of players that won