1 Tic Tac Toe Game Protocol
2 =========================
3 Note: All square numbers in the protol below are as follows:
11 For a specific game the following API endpoints are defined.
12 (Note: Only the trailing portion of the API URI is provided here.
13 The preceding portions of the path must be determined externally.)
17 This is a server-sent events stream that allows the server to push
18 game-related events to clients. When a client connects to this API
19 endpoint the server will return a header that includes:
21 Content-type: text/event-stream
22 Connection: keep-alive
23 Cache-Control: no-cache
25 and will keep the connection open to return events.
27 The following event types will be returned by the server:
31 WHEN: When a client first connections
36 data: {"moves":[0,8],"board":["X","","","","","","","","O"],"next_player":"X"}
40 WHEN: When a client (maybe yourself) issues a legal move
51 Behavior: Adds a new move to the game
53 Example data: { "square": 4 }