X-Git-Url: https://git.cworth.org/git?p=ttt;a=blobdiff_plain;f=PROTOCOL;h=91c8545b88ac96f482ca5c27893a3715ce10ba07;hp=a97a176c5f7f87afbc4bedb050261007723d624a;hb=HEAD;hpb=7e5b08180753d07354b2d586b8c78fd4d51c5e0f diff --git a/PROTOCOL b/PROTOCOL index a97a176..91c8545 100644 --- a/PROTOCOL +++ b/PROTOCOL @@ -1,19 +1,20 @@ - Ricochet Robots Game Protocol (RRGP) - Version 0.1.2 - 2003-5-31 + Tic-tac-toe Protocol (TTTP) + Version 0.0.1 + 2005-11-05 - Keith Packard Carl Worth - keithp@keithp.com carl@theworths.org + Carl Worth Richard Worth Kevin Worth + carl@theworths.org richard@theworths.org kevin@theworths.org Introduction -RRGP is a network protocol for playing the Ricochet Robots game. It permits -a single server to host multiple games with named participants. The +TTTP is a network protocol for playing the game tic-tac-toe. It permits +a single server to host multiple games with named participants. The protocol is designed so that people can play using only telnet, but it is expected that graphical interfaces will be able to drive the protocol as well. -RRGP borrows ideas from other network protocols like SMTP using a +TTTP borrows heavily from RRGP (Ricochet Robot Game Protocol) by Keith +Packard and indirectly from other network protocols like SMTP using a synchronous command interface. Document Conventions @@ -30,46 +31,51 @@ Document Conventions is one of: - ERROR + ERROR 1. Requests -1.1 Connection setup +1.1. Connection setup - The RRGP server has no well defined port; agreement on which port to + The TTTP server has no well defined port; agreement on which port to use must be done through some external mechanism. Once connected, the client must identify itself: - HELO [] + HELO -> - HELO + HELO - If the client doesn't supply , the server will compute - one and return it. - - Possible errors: INVALIDNAME + Possible errors: INVALID_NAME 1.2. Global commands - 1.2.1 Listing available users + 1.2.1. Listing available users WHO -> - WHO ... + WHO ... + + Lists connected users. - lists connected users and the number of games they've won. + Possible errors: NO_NAME_SET - 1.2.2. Listing available games + 1.2.2. STATISTICS - GAMES + STATISTICS -> - GAMES ... + STATISTICS " + TICTACTOE WINS + " + + Lists the statistics for the specified user. + + Possible errors: NO_NAME_SET, NO_USER 1.2.3. Message @@ -79,10 +85,22 @@ Document Conventions MESSAGE + Sends a message to all connected users. The text must be a + single token. Use a quoted-string to include spaces in the + message text. + + Possible errors: NO_NAME_SET + 1.2.4. Help HELP { } + -> + + HELP { } " + + " + Displays help. If is provided, displays more detailed help on a specific command, otherwise displays an overview of all commands. @@ -95,6 +113,8 @@ Document Conventions QUIT + Disconnects the client from the server. + 1.2.6. Version VERSION @@ -111,283 +131,108 @@ Document Conventions 1.3. Game management commands - 1.3.1. Listing players in a game - - PLAYERS - - -> - - PLAYERS ... - - Possible errors: NOGAME + 1.3.1. Inviting a player to play a game - 1.3.2. Listing watchers of a game - - WATCHERS + INVITE -> - WATCERS ... + INVITE - Possible errors: NOGAME + Possible errors: NO_NAME_SET, NO_USER, BUSY - 1.3.3. Get game information + 1.3.2. Accepting an invitation - GAMEINFO + ACCEPT -> - GAMEINFO