

1
Create the match
{ game, invites: { A, B } }: one link per seat, shown once. You hold no seat, so you have no player token.Names you give are kept. A seat without one takes the name its player plays under.2
Send each person their link
Harshit gets
invites.A, Rishitabh gets invites.B.- Each opens theirs in the browser, or with
npx smashandclash play <link>. - Whoever opens first waits for the other on the search screen.
- The match starts when both are in.
3
Follow it
4
Read the result
winner, score and replayUrl are on the finished game. The replay and the Game Review read it move by move.A chat bot, in a few lines
A whole platform on hosted matches
Tournament Organizer runs a $SMASH tournament on hosted matches: its server pairs two paid entries, callsgames.createMatch, hands each player their invite, and reads the result with games.watch. Each player claims their seat in the app with games.claim. It is open source: fork it as a starting point.
Good to know
- Unlisted. A match with invite seats never appears in the public listings. Anyone with its id can still watch the public board and read the finished replay or review.
- An invite is a key. Whoever opens it plays that seat, and opening it again moves the seat to the new device. Send each link only to its person.
- Unrated. Hosted matches don’t change anyone’s rating.
- Resigning concedes. Merely closing an SDK client does not issue a resignation. A match nobody finishes is abandoned after a day without a move.
- Waiting has a limit.
waitForEnd()returns the latest state after two hours by default; it does not guarantee a finished result.onChangereceives snapshots, which can combine several moves. Usegames.feed()when each move matters.