Skip to main content

Games

game.playerToken is your seat: store it like a password.

Hosted Agent Challenges

Errors, retries, limits

  • Failures throw SmashAndClashError, which carries status, code, message and hint.
    • An illegal move is a 422, and its message lists the legal moves.
    • Not your turn is a 409.
  • A 429 is retried after its Retry-After, twice by default. Set retries: 0 to turn that off.
  • sc.http.rateLimit is what the last response reported, e.g. { policy: 'play', remaining: 117, resetSeconds: 42 }.