aboutsummaryrefslogtreecommitdiff
path: root/doc/api.org
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api.org')
-rw-r--r--doc/api.org16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/api.org b/doc/api.org
index cd7dec3..25eb9a0 100644
--- a/doc/api.org
+++ b/doc/api.org
@@ -22,8 +22,8 @@
"syn": 1,
"game-id": 1,
"game-over": false,
- "snake": [(1,2),(1,3)],
- "food": [(6,7)]
+ "snake": [[1,2],[1,3]],
+ "food": [[6,7]]
}
#+END_SRC
Note that, syn entry is used to keep packet ordering consistent and detecting packet inversion on the network. Thus,
@@ -46,8 +46,8 @@
"syn": 2,
"game-id": 1,
"game-over": false,
- "snake": [(0,2),(1,2)],
- "food": [(6,7)]
+ "snake": [[0,2],[1,2]],
+ "food": [[6,7]]
}
#+END_SRC
*** Refresh Screen
@@ -67,8 +67,8 @@
"syn": 3,
"game-id": 1,
"game-over": false,
- "snake": [(1,2),(0,2)],
- "food": [(6,7)]
+ "snake": [[1,2],[0,2]],
+ "food": [[6,7]]
}
#+END_SRC
*** End Game
@@ -79,8 +79,8 @@
"syn": null,
"game-id": 1,
"game-over": true,
- "snake": [(0,2),(1,2)],
- "food": [(6,7)]
+ "snake": [[0,2],[1,2]],
+ "food": [[6,7]]
}
#+END_SRC
- No reply is expected from the client and server will be in charge to free local memory. Note that syn=null.