* PROTOCOL: Add RETRACT, DECLINE. Add game identifier for all game
commands.
* TODO: Add RETRACT, DECLINE, notices.
+2005-12-03 Richard D. Worth <richard@theworths.org>
+
+ * PROTOCOL: Add RETRACT, DECLINE. Add game identifier for all game
+ commands.
+
+ * TODO: Add RETRACT, DECLINE, notices.
+
2005-12-03 Richard D. Worth <richard@theworths.org>
* PROTOCOL: Add underscores to error codes. Add STATISTICS
2005-12-03 Richard D. Worth <richard@theworths.org>
* PROTOCOL: Add underscores to error codes. Add STATISTICS
- Possible errors: NO_NAME_SET
+ Possible errors: NO_USER, NO_NAME_SET
+
+ 1.3.3. Retracting an invitiation
+
+ RETRACT <username>
+
+ ->
+
+ RETRACT
+
+ Possible errors: NO_USER, NO_NAME_SET
+
+ 1.3.3. Declining an invitation
+
+ DECLINE <username>
+
+ ->
+
+ DECLINE
+
+ Possible errors: NO_USER, NO_NAME_SET
+ <game> is a game id generated by the server and first returned in
+ NOTICE NEWGAME
+
1.4.1. Get the game contents
1.4.1. Get the game contents
+ SHOW <game> <game-board>
<game-board> is a quoted multi-line string containing an
diagram of the tic-tac-toe board, which is a 3x3 array of
<game-board> is a quoted multi-line string containing an
diagram of the tic-tac-toe board, which is a 3x3 array of
- Possible errors: NOT_IN_GAME, NO_NAME_SET
+ Possible errors: NO_NAME_SET, NO_GAME, NOT_IN_GAME
- Departs the current game
+ Departs the specified game
- Possible errors: NOT_IN_GAME, NO_NAME_SET
+ Possible errors: NO_NAME_SET, NO_GAME, NOT_IN_GAME
- Possible errors: NOT_IN_GAME, NOT_YOUR_MOVE, NOT_GRID, NO_NAME_SET
+ Possible errors: NO_NAME_SET, NO_GAME, NOT_IN_GAME,
+ NOT_YOUR_MOVE, NOT_GRID
2. Asynchronous notification.
2. Asynchronous notification.
NOTICE QUIT <username>
2.1.3. Game invitation
NOTICE QUIT <username>
2.1.3. Game invitation
+
+ 2.1.3.1. Invitation is made
+
+ NOTICE INVITE <username1> <username2>
+
+ 2.1.3.2. Invitation is accepted
+
+ NOTICE ACCEPT <username2> <username1>
+
+ 2.1.3.3. Invitation is retracted
+
+ NOTICE RETRACT <username1> <username2>
+
+ 2.1.3.4. Invitation is declined
+
+ NOTICE DECLINE <username2> <username1>
+
+ The first username listed is the one performing the action.
+
+ 2.1.4. New games
+
+ NOTICE NEWGAME <game> <username> <username>
- NOTICE INVITE <username>
-
- 2.1.4. Terminated games
+ The first username listed will go first.
+
+ 2.1.5. Terminated games
NOTICE MESSAGE <username> <text>
NOTICE MESSAGE <username> <text>
2.2. Game notices
These notices are sent to all players and watchers in
2.2. Game notices
These notices are sent to all players and watchers in
- 2.2.1. Global game notices
-
- 2.2.1.1. New game begins
+ <game> is a game id generated by the server and first returned in
+ NOTICE NEWGAME
- NOTICE NEWGAME <username> <username>
-
- The first username listed will go first
+ 2.2.1. Global game notices
- 2.2.1.2. Game over, and winner
+ 2.2.1.1. Game over, and winner
- NOTICE GAMEOVER <outcome> <username>
+ NOTICE GAMEOVER <game> <outcome> <username>
<outcome> is either WON in which case <username> indicates
the winner or CATSGAME in which case <username> is "".
<outcome> is either WON in which case <username> indicates
the winner or CATSGAME in which case <username> is "".
- NOTICE MOVE <username> <number>
+ NOTICE MOVE <game> <username> <number>
1.3. Game management commands
1.3.1. INVITE
1.3.2. ACCEPT
1.3. Game management commands
1.3.1. INVITE
1.3.2. ACCEPT
+ 1.3.3. RETRACT
+ 1.3.4. DECLINE
1.4. In-game commands
1.4.1. SHOW
1.4.2. PART
1.4. In-game commands
1.4.1. SHOW
1.4.2. PART
2.1. Global notices
✓ 2.1.1. NOTICE USER <username>
✓ 2.1.2. NOTICE QUIT <username>
2.1. Global notices
✓ 2.1.1. NOTICE USER <username>
✓ 2.1.2. NOTICE QUIT <username>
- 2.1.3. NOTICE INVITE <username>
- 2.1.4. NOTICE DISPOSE <game>
-✓ 2.1.5. NOTICE MESSAGE <username> <text>
+ 2.1.3. Game Invitation
+ 2.1.3.1. NOTICE INVITE <username1> <username2>
+ 2.1.3.2. NOTICE ACCEPT <usernmae2> <username1>
+ 2.1.3.3. NOTICE RETRACT <username1> <username2>
+ 2.1.3.4. NOTICE DECLINE <username2> <username1>
+ 2.1.4. NOTICE NEWGAME <game> <username> <username>
+ 2.1.5. NOTICE DISPOSE <game>
+✓ 2.1.6. NOTICE MESSAGE <username> <text>
2.2. Game notices
2.2.1. Global game notices
2.2. Game notices
2.2.1. Global game notices
- 2.2.1.1. NOTICE NEWGAME <username> <username>
- 2.2.1.2. NOTICE GAMEOVER <outcome> <username>
+ 2.2.1.1. NOTICE GAMEOVER <game> <outcome> <username>
- 2.2.2.1. NOTICE MOVE <username> <number>
+ 2.2.2.1. NOTICE MOVE <game> <username> <number>
3. Errors
3.1. Connection setup errors
3. Errors
3.1. Connection setup errors
-✓ 3.1.1. ERROR NONAMESET
-✓ 3.1.2. ERROR INVALIDNAME
+✓ 3.1.1. ERROR NO_NAME_SET
+✓ 3.1.2. ERROR INVALID_NAME
3.2. Command format errors
3.2.1. ERROR COMMAND
✓ 3.2.2. ERROR SYNTAX
3.2. Command format errors
3.2.1. ERROR COMMAND
✓ 3.2.2. ERROR SYNTAX
- 3.2.3. ERROR NOTNUMBER
- 3.2.4. ERROR NOTGRID
+ 3.2.3. ERROR NOT_NUMBER
+ 3.2.4. ERROR NOT_GRID
3.3. Global command errors.
3.4. Game management errors.
3.3. Global command errors.
3.4. Game management errors.
3.5. User information errors
3.5. User information errors
3.6. In-game errors
3.6.1. Global game errors
3.6. In-game errors
3.6.1. Global game errors
- 3.6.1.1. ERROR NOTINGAME
- 3.6.1.2. ERROR NOTPLAYING
+ 3.6.1.1. ERROR NOT_IN_GAME
+ 3.6.1.2. ERROR NOT_PLAYING
- 3.6.2.1. ERROR NOTYOURTURN
+ 3.6.2.1. ERROR NOT_YOUR_TURN