]> Dogcows Code - chaz/carfire/commitdiff
testing
authorbrady <brady@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Sat, 20 Mar 2010 09:35:24 +0000 (09:35 +0000)
committerbrady <brady@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Sat, 20 Mar 2010 09:35:24 +0000 (09:35 +0000)
git-svn-id: https://bd85.net/svn/cs3505_group@18 92bb83a3-7c8f-8a45-bc97-515c4e399668

Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs

index 71f5bfeadfc175560177236c5a276127434d9893..e26d5e56d23b83fe91545bad981420ad0a7e3f80 100644 (file)
@@ -171,7 +171,6 @@ namespace CS_3505_Project_06
                     {\r
                         currentState = lobbyState.Connected;\r
                         networkGame.CreateSession(4);\r
-                        players = networkGame.LocalGamers;\r
                     }   \r
                     break;\r
 \r
@@ -182,7 +181,11 @@ namespace CS_3505_Project_06
                         ready = false;\r
                     }\r
                     availableSessions = networkGame.FindSessions();\r
-\r
+                    if (availableSessions != null)\r
+                    {\r
+                        networkGame.JoinSession(availableSessions[0]);\r
+                        currentState = lobbyState.Connected;\r
+                    }\r
                     break;\r
 \r
                 case lobbyState.Connected:\r
@@ -198,6 +201,15 @@ namespace CS_3505_Project_06
                     }\r
                     if (currentKeyboardState.IsKeyDown(Keys.R) && previousKeyboardState.IsKeyUp(Keys.R))\r
                         ready = true;\r
+\r
+                    if (networkGame.sessionExists())\r
+                    {\r
+                        players = networkGame.LocalGamers;\r
+                    }\r
+                    else\r
+                        currentState = lobbyState.Welcome;\r
+\r
+\r
                     break;\r
 \r
             }\r
This page took 0.025921 seconds and 4 git commands to generate.