]> git.cworth.org Git - lmno-api/blobdiff - tictactoe.txt
tictactoe: Change /move event to have data named "move", not "square"
[lmno-api] / tictactoe.txt
index 62046a6e23822d5d72f907c95adfb9f2c6c39826..2211a05984ca32d1d30d51eee934f5f7f1d5ec6f 100644 (file)
@@ -26,6 +26,15 @@ For a specific game the following API endpoints are defined.
 
     The following event types will be returned by the server:
 
+        TYPE: game-state
+
+        WHEN: When a client first connections
+
+        EXAMPLE:
+
+               event: game-state
+                data: {"moves":[0,8],"board":["X","","","","","","","","O"],"next_player":"X"}
+
        TYPE: move
 
        WHEN: When a client (maybe yourself) issues a legal move
@@ -41,4 +50,4 @@ For a specific game the following API endpoints are defined.
 
     Behavior: Adds a new move to the game
 
-    Example data: { "square": 4 }
+    Example data: { "move": 1 }