From da08dd5249127eed106e041059d4fd987b17a65c Mon Sep 17 00:00:00 2001 From: brady Date: Sat, 20 Mar 2010 09:35:24 +0000 Subject: [PATCH] testing git-svn-id: https://bd85.net/svn/cs3505_group@18 92bb83a3-7c8f-8a45-bc97-515c4e399668 --- .../CS 3505 Project 06/LobbyGUI.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs b/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs index 71f5bfe..e26d5e5 100644 --- a/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs +++ b/Project06/CS 3505 Project 06/CS 3505 Project 06/LobbyGUI.cs @@ -171,7 +171,6 @@ namespace CS_3505_Project_06 { currentState = lobbyState.Connected; networkGame.CreateSession(4); - players = networkGame.LocalGamers; } break; @@ -182,7 +181,11 @@ namespace CS_3505_Project_06 ready = false; } availableSessions = networkGame.FindSessions(); - + if (availableSessions != null) + { + networkGame.JoinSession(availableSessions[0]); + currentState = lobbyState.Connected; + } break; case lobbyState.Connected: @@ -198,6 +201,15 @@ namespace CS_3505_Project_06 } if (currentKeyboardState.IsKeyDown(Keys.R) && previousKeyboardState.IsKeyUp(Keys.R)) ready = true; + + if (networkGame.sessionExists()) + { + players = networkGame.LocalGamers; + } + else + currentState = lobbyState.Welcome; + + break; } -- 2.45.2