Skip to main content

Module otb

Module otb 

Source
Expand description

Games on a real board, recorded live from the app.

One of the players records the game on their phone: from a connected board (Chessnut), from photos after each move, or by hand. Each move is sent as it’s made, so the game is followed live like any other (the public stream, the live board overlay for a video stream). It ends when the recorder says, or on the board (mate, stalemate…). A rated one is rated, and reaches the feed, once the other player confirms the result (POST /api/games/{id}/confirm), as with a game played on one device.

  • POST /api/otb: start one.
  • POST /api/otb/{id}/move, /undo, /end.
  • GET /broadcast/{id}?key=: the live board overlay (board, last moves, players, result) for a streaming app’s browser source, and GET /api/broadcast/{id}/events?key= behind it. The key is the secret the recorder was given; nothing else about the game is open.

Structs§

End
Move
Start
Undo

Functions§

end
POST /api/otb/{id}/end: a result decided off the board (resignation, an agreed draw, a flag on a real clock), or the game abandoned.
events
GET /api/broadcast/{id}/events?key=: the game as server-sent state events, now and after every move.
make_move
POST /api/otb/{id}/move: the next move, as played on the board.
page
GET /broadcast/{id}?key=: the overlay page (bg=transparent for a streaming app’s browser source; theme=light).
start
POST /api/otb: the recorder is one of the two players; the other confirms the result.
undo
POST /api/otb/{id}/undo: take back moves recorded wrongly.