Skip to main content
Use the seat sync to show a game your own way: a chat bot that posts the board, a custom client, a stream overlay. It’s what the website’s own match uses for a person’s seat. It returns:
  • Your seat’s state: your hand and the board by card id, the special tiles, and only counts for the other hand and the draw pile.
  • Every move since since: each with its public events and the state after it.
Your client syncs from move 0 and gets the state and every move with its events; then it syncs again from moveCount, waiting up to 20 seconds, and animates each new move's eventsYour client syncs from move 0 and gets the state and every move with its events; then it syncs again from moveCount, waiting up to 20 seconds, and animates each new move's events
For a runnable version, see examples/node/draw-your-own-board.mjs in smashandclash/tldraw, which also has a full client that draws the game on a whiteboard.
The SDK returns SeatSync from game.sync() without updating game.state or game.view. Draw the returned s.state, and call await game.refresh() before selecting a move from game.legalMoves. Refresh when the status changes so the next long-poll uses the current status. A sync received while nobody has moved still contains the current board, so render that snapshot even when s.moves is empty. See SDK lifecycle.

The state

  • board[r][c]: r 0–2 is rows 1–3, and c 0–4 is columns A–E. The SDK’s cellToRC('C2') and rcToCell({ r, c }) convert.
Each cell with its board index: A1 is board[0][0], C2 is board[1][2], E3 is board[2][4]Each cell with its board index: A1 is board[0][0], C2 is board[1][2], E3 is board[2][4]
  • Card ids name cards in the card list, which gives values, colours, art and animation. The game view (game.view) carries the same cardId on every hand and board card.
  • Build your own client covers drawing the cards, the attack animation and the sound.
  • A card’s sides are read from its owner’s side; see move names.

The moves

Each entry in moves is { index, seat, name, move, events, state }. The events describe what happened, in order: Nothing in a sync shows a card the seat couldn’t see at the table. A draw is a count, and a swap carries no ids. When the game is over, reveal carries its seed. See fair play.