camino-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Camino-devel] camino/docs server-engine.txt


From: Philippe Fremy
Subject: [Camino-devel] camino/docs server-engine.txt
Date: Sun, 26 Jan 2003 09:40:04 -0500

CVSROOT:        /cvsroot/camino
Module name:    camino
Changes by:     Philippe Fremy <address@hidden> 03/01/26 09:40:03

Modified files:
        docs           : server-engine.txt 

Log message:
        finish state machine of server

Patches:
Index: camino/docs/server-engine.txt
diff -u camino/docs/server-engine.txt:1.1 camino/docs/server-engine.txt:1.2
--- camino/docs/server-engine.txt:1.1   Wed Jan 15 17:27:27 2003
+++ camino/docs/server-engine.txt       Sun Jan 26 09:40:03 2003
@@ -16,9 +16,8 @@
                                                                        4 
players ?
                                                                                
yes: 
                                                                                
        -> Change state to SelectTeam
-                                                                               
        -> Send 3 combination of teams
                                                                                
no:  
-                                                                               
        -> change state to PlayGame
+                                                                               
        -> change state to BeginParty
 
 SelectTeam                             Player selects team combination
                                                        -> Send Msg to all 
player
@@ -26,11 +25,104 @@
                                                                no:
                                                                        -> keep 
current state
                                                                yes:
-                                                                       -> 
distribute 6 tiles
-                                                                       -> 
active a player to play
-                                                                       -> 
change state to PlayGame
+                                                                       -> 
Change state to BeginParty
+
+BeginParty
+                                       Entering
+                                               -> distribute tiles
+                                               -> activate current player
+                                               -> change state to PlayGame
 
 PlayGame
+                                       Player sends a move (trash a tile, 
complete board, new
+                                       tile)
+                                               -> server checks the move for 
correctness ?
+                                                       no:
+                                                               -> move rejected
+                                                               -> back to 
PlayGame
+                                                       yes:
+                                                               -> update board
+                                                               -> distribute 
another tile to player
+                                                               -> false move ?
+                                                                       yes:
+                                                                               
-> ChangeState to PlayGame
+                                                                       no:
+                                                                               
-> activate next player
+                                                                               
-> Change state to PlayGame
+
+                                       Player requests undo:
+                                               -> server dispatch undo request
+                                               -> change state to UndoRequested
+
+                                       Player requests end of game
+                                               -> server dispatch end of 
gamerequest
+                                               -> change state to 
EndOfGameRequested
+
+UndoRequested
+                                       Player rejects undo:
+                                               -> inform clients about undo 
reject
+                                               -> return to playgame
+
+                                       Player accepts undo
+                                               -> all players have accepted 
the undo ?
+                                                       no:
+                                                               -> stay in 
UndoRequested
+                                                       yes:
+                                                               -> update the 
board with the removed tile
+                                                               -> activate 
player
+                                                               -> return to 
PlayGame
+
+
+
+EndOfGameRequested
+                                       Player rejects EndOfGame:
+                                               -> inform clients about 
EndOfGame reject
+                                               -> return to playgame
+
+                                       Player accepts EndOfGame
+                                               -> all players have accepted 
the EndOfGame ?
+                                                       no:
+                                                               -> stay in 
EndOfGameRequested
+                                                       yes:
+                                                               -> Change state 
to EndOfGame
+
+EndOfGame
+                                       Entering:
+                                               -> can path be found on the 
board ?
+                                                       yes:
+                                                               -> change state 
to EndOfParty
+                                                       no:
+                                                               -> change state 
to PlayerCompletesTheBoard
+
+PlayerCompletesTheBoard:
+                                       Player sends move to complete the board
+                                               -> dispatch the move
+                                               [ possible choice: change state 
to EndOfGame ]
+
+                                       Player send Board is completed message
+                                               -> change state to 
WaitForOtherPlayersToCompletTheBoard
+
+WaitForOtherPlayersToCompletTheBoard
+                                       Player sends a move to complete the 
board
+                                               -> return to 
PlayerCompleteTheBoard state
+                                               -> dispatch the move
+                                               [ possible choice : change 
state to EndOfGame ]
+
+                                       Player send Board is completed message:
+                                               -> all players have agreed on 
the board ?
+                                                       yes:
+                                                               -> change state 
to EndOfParty
+                                                       no:
+                                                               -> stay in 
current state
+
+
+EndOfParty
+
+
+
+
+
+                                       
 
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]