From 4f0f5e3d16e6ec375844c711d4f88d6fec79ae45 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Sun, 4 Dec 2005 03:02:03 +0000 Subject: [PATCH] 2005-12-03 Richard D. Worth * PROTOCOL: Add RETRACT, DECLINE. Add game identifier for all game commands. * TODO: Add RETRACT, DECLINE, notices. --- ChangeLog | 7 +++++ PROTOCOL | 91 ++++++++++++++++++++++++++++++++++++++++--------------- TODO | 36 +++++++++++++--------- 3 files changed, 95 insertions(+), 39 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d2bc1d..ebf09f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-12-03 Richard D. Worth + + * PROTOCOL: Add RETRACT, DECLINE. Add game identifier for all game + commands. + + * TODO: Add RETRACT, DECLINE, notices. + 2005-12-03 Richard D. Worth * PROTOCOL: Add underscores to error codes. Add STATISTICS diff --git a/PROTOCOL b/PROTOCOL index be0f04d..4fcec63 100644 --- a/PROTOCOL +++ b/PROTOCOL @@ -149,17 +149,40 @@ Document Conventions ACCEPT - Possible errors: NO_NAME_SET + Possible errors: NO_USER, NO_NAME_SET + + 1.3.3. Retracting an invitiation + + RETRACT + + -> + + RETRACT + + Possible errors: NO_USER, NO_NAME_SET + + 1.3.3. Declining an invitation + + DECLINE + + -> + + DECLINE + + Possible errors: NO_USER, NO_NAME_SET 1.4. In-game commands + is a game id generated by the server and first returned in + NOTICE NEWGAME + 1.4.1. Get the game contents - SHOW + SHOW -> - SHOW + SHOW is a quoted multi-line string containing an diagram of the tic-tac-toe board, which is a 3x3 array of @@ -173,28 +196,28 @@ Document Conventions For example: - SHOW " + SHOW " _|X|O _|X|_ X|O|O" - Possible errors: NOT_IN_GAME, NO_NAME_SET + Possible errors: NO_NAME_SET, NO_GAME, NOT_IN_GAME 1.4.2. Part - PART + PART -> PART - 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 1.4.3. Making a move - MOVE + MOVE -> @@ -207,7 +230,8 @@ Document Conventions 3|4|5 6|7|8 - 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. @@ -235,14 +259,36 @@ Document Conventions NOTICE QUIT 2.1.3. Game invitation + + 2.1.3.1. Invitation is made + + NOTICE INVITE + + 2.1.3.2. Invitation is accepted + + NOTICE ACCEPT + + 2.1.3.3. Invitation is retracted + + NOTICE RETRACT + + 2.1.3.4. Invitation is declined + + NOTICE DECLINE + + The first username listed is the one performing the action. + + 2.1.4. New games + + NOTICE NEWGAME - NOTICE INVITE - - 2.1.4. Terminated games + The first username listed will go first. + + 2.1.5. Terminated games NOTICE DISPOSE - 2.1.5. Message + 2.1.6. Message NOTICE MESSAGE @@ -251,19 +297,16 @@ Document Conventions 2.2. Game notices These notices are sent to all players and watchers in - the affected game + the affected game. - 2.2.1. Global game notices - - 2.2.1.1. New game begins + is a game id generated by the server and first returned in + NOTICE NEWGAME - NOTICE NEWGAME - - 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 + NOTICE GAMEOVER is either WON in which case indicates the winner or CATSGAME in which case is "". @@ -272,7 +315,7 @@ Document Conventions 2.2.2.1. Move - NOTICE MOVE + NOTICE MOVE 3. Errors diff --git a/TODO b/TODO index f7fe04b..0aaf881 100644 --- a/TODO +++ b/TODO @@ -16,6 +16,8 @@ S C 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 @@ -24,33 +26,37 @@ S C 2.1. Global notices ✓ 2.1.1. NOTICE USER ✓ 2.1.2. NOTICE QUIT - 2.1.3. NOTICE INVITE - 2.1.4. NOTICE DISPOSE -✓ 2.1.5. NOTICE MESSAGE + 2.1.3. Game Invitation + 2.1.3.1. NOTICE INVITE + 2.1.3.2. NOTICE ACCEPT + 2.1.3.3. NOTICE RETRACT + 2.1.3.4. NOTICE DECLINE + 2.1.4. NOTICE NEWGAME + 2.1.5. NOTICE DISPOSE +✓ 2.1.6. NOTICE MESSAGE 2.2. Game notices 2.2.1. Global game notices - 2.2.1.1. NOTICE NEWGAME - 2.2.1.2. NOTICE GAMEOVER + 2.2.1.1. NOTICE GAMEOVER 2.2.2. Move notices - 2.2.2.1. NOTICE MOVE + 2.2.2.1. NOTICE MOVE 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.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.4.1. ERROR NOGAME + 3.4.1. ERROR NO_GAME 3.5. User information errors - 3.5.1. ERROR NOUSER + 3.5.1. ERROR NO_USER 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. Moving errors - 3.6.2.1. ERROR NOTYOURTURN + 3.6.2.1. ERROR NOT_YOUR_TURN -- 2.43.0