[Commit] rrserver protocol,1.2,1.3

Keith Packard commit@keithp.com
Tue, 27 May 2003 21:28:06 -0700


Committed by: keithp

Update of /local/src/CVS/rrserver
In directory home.keithp.com:/tmp/cvs-serv1733

Modified Files:
	protocol 
Log Message:
Answer carls questions

Index: protocol
===================================================================
RCS file: /local/src/CVS/rrserver/protocol,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- protocol	27 May 2003 20:05:25 -0000	1.2
+++ protocol	28 May 2003 04:28:03 -0000	1.3
@@ -72,14 +72,14 @@
 	->
 
 	OK
-	BOARD <board1>
-	BOARD <board2>
+	GAME <game1>
+	GAME <game2>
 	...
 	DONE
 
 1.4. Listing users in a game
 
-	USERS <board>
+	USERS <game>
 
 	->
 
@@ -91,17 +91,17 @@
 
 1.5. Creating a new game
 
-	NEW
+	NEW <game-suggestion>
 
 	->
 
 	OK
-	BOARD <board>
+	GAME <game>
 	DONE
 
 1.6. Joining an existing game
 
-	JOIN <board>
+	JOIN <game>
 
 	->
 
@@ -115,7 +115,7 @@
 
 1.7. Watching an existing game
 
-	WATCH <board>
+	WATCH <game>
 
 	->
 
@@ -130,7 +130,7 @@
 
 	Possible errors: NOGAME
 
-1.8. Get the board contents
+1.8. Get the game contents
 
 	SHOW
 
@@ -174,7 +174,18 @@
 	'S' or 'W'.
 
 
-1.11. Reset
+1.12. Undo
+
+	UNDO
+
+	->
+
+	OK
+	DONE
+
+	Undoes the last move
+
+1.13. Reset
 
 	RESET
 
@@ -183,7 +194,9 @@
 	OK
 	DONE
 
-1.12. Next turn
+	Resets robot positions to that at the start of the turn.
+
+1.14. Next turn
 
 	TURN
 
@@ -192,6 +205,24 @@
 	OK
 	DONE
 
+1.15. Pass the bid to the next lowest bidder
+
+	PASS
+
+	->
+
+	OK
+	DONE
+
+1.16. Message
+
+	MESSAGE <text>
+
+	->
+	
+	OK
+	DONE
+
 2. Asynchronous notification.  
 
 	The server will send notices to each user in a game whenever
@@ -224,13 +255,13 @@
 2.4. New games
 
 	NOTICE
-	BOARD <board>
+	GAME <game>
 	DONE
 
 2.5. Terminated games
 
 	NOTICE
-	TERMINATE <board>
+	TERMINATE <game>
 	DONE
 
 2.6. Bids
@@ -247,7 +278,34 @@
 
 	Timer ticks are sent every 10 seconds
 
-2.8. Next turn
+2.8. Select active player
+
+	NOTICE
+	ACTIVE <username>
+	DONE
+
+	Only the active player may move the robots
+
+2.9. Move
+
+	NOTICE
+	MOVE <color>, <dir>
+	DONE
+
+2.10. Undo
+
+	NOTICE
+	UNDO
+	DONE
+
+2.11. Reset
+
+	NOTICE
+	RESET
+	DONE
+	
+
+2.12. Next turn
 
 	NOTICE
 	TURN <color><shape>
@@ -255,6 +313,26 @@
 
 	<color><shape> will be 'ww' for the whirlpool.
 
+2.13. Message
+
+	NOTICE
+	MESSAGE <text>
+	USER <username>
+	DONE
+
+2.14. Abandon request
+
+	NOTICE
+	ABANDON <username>
+	DONE
+
+	<username> has requested that the current turn be abandoned
+	(i.e. TURN requested without a solution demonstrated>
+	If all active users in the current game make a TURN
+	request, then the turn is abandoned and the next turn
+	selected with the robots reset to their position before the
+	turn started.
+
 3. Errors
 
 	The following error codes may be returned.
@@ -275,27 +353,68 @@
 
 	Possibly returned by: BID
 
+3.3. Not active
+
+	ERROR NOTACTIVE
+
+	A move, undo or reset was submitted by other than the
+	active user.
+	
+	Possibly returned by: MOVE, RESET, UNDO
+
 Some comments from Carl Worth
 -----------------------------
-I don't understand the board contents. What is '_'?  How are robot and
-target colors indicated for the same space?
 
-Can we replace "BOARD" with "GAME" in the protocol?
+> I don't understand the board contents. What is '_'?  How are robot and
+> target colors indicated for the same space?
 
-Shall we require a quorum for TURN? Perhaps no quorum requirement
-after the timer has run out and a correct solution has been
-demonstrated?
+How about:
 
-What are the semantics of RESET? Quorum?
+	 ==
+	|.. .. ..
+	|RR .. gg
+	
+	 gs|.. RT|
+	 ..|.. ..|
+	 ==    ==
+	
+	RT =	Red triangle (goal target)
+	gs = 	Green square (non-goal target)
+	RR = 	Red robot (goal robot)
+	gg = 	Green robot (non-goal target)
 
-Hmmm... looks like a user can only be in a single game (would need to
-fix SHOW, BID, MOVE, RESET, TURN, NOTICE, etc.)
+Does that look unambiguous?
 
-I wonder if this server should just support one game at a time,
-(available servers/users for other games can be negotiated
-externally).
+> Can we replace "BOARD" with "GAME" in the protocol?
 
-And does the server know the rules/keep score?
+Sure.
 
-Do we allow broadcast and private messages?
+> Shall we require a quorum for TURN? Perhaps no quorum requirement
+> after the timer has run out and a correct solution has been
+> demonstrated?
 
+Hmm.  I think that's reasonable -- require quorum for abandoning without a
+solution.  That'll take another notice (ABANDON)
+
+> What are the semantics of RESET? Quorum?
+
+RESET is just like MOVE - only the current user can execute reset
+
+> Hmmm... looks like a user can only be in a single game (would need to
+> fix SHOW, BID, MOVE, RESET, TURN, NOTICE, etc.)
+
+Yup.
+
+> I wonder if this server should just support one game at a time,
+> (available servers/users for other games can be negotiated
+> externally).
+
+Easy to support multiple games, and that means we only ever need one server.
+
+> And does the server know the rules/keep score?
+
+I think it might as well; the C code I've got already manages that part.
+
+> Do we allow broadcast and private messages?
+
+Just broadcast.