]> Dogcows Code - chaz/carfire/blobdiff - Project06/CS 3505 Project 06/CS 3505 Project 06/NetworkGame.cs
testing
[chaz/carfire] / Project06 / CS 3505 Project 06 / CS 3505 Project 06 / NetworkGame.cs
index abe36ba4a4d4ca1dcd6d84affc91fbad5766960e..d2b4846489967f504ac36634be1aebbaed6f54b1 100644 (file)
@@ -59,7 +59,7 @@ namespace CS_3505_Project_06
         }\r
 \r
 \r
-        LocalNetworkGamer LocalGamer\r
+        public LocalNetworkGamer LocalGamer\r
         {\r
             get\r
             {\r
@@ -67,8 +67,18 @@ namespace CS_3505_Project_06
             }\r
         }\r
 \r
+        // I added this as I needed a way to display all gamers not just the first gamer\r
+        //    -Brady\r
+        public GamerCollection<NetworkGamer> NetworkGamers\r
+        {\r
+            get\r
+            {\r
+                return mNetworkSession.AllGamers;\r
+            }\r
+        }\r
 \r
-        NetworkSession CreateSession()\r
+\r
+        public NetworkSession CreateSession()\r
         {\r
             return CreateSession(mGame.MaximumSupportedPlayers);\r
         }\r
@@ -84,6 +94,12 @@ namespace CS_3505_Project_06
             return mNetworkSession;\r
         }\r
 \r
+        // added so I can test if sessionExists and thus be able to call things on NetworkGame safely\r
+        //    -Brady\r
+        public bool sessionExists()\r
+        {\r
+            return mNetworkSession != null;\r
+        }\r
 \r
         public AvailableNetworkSessionCollection FindSessions()\r
         {\r
@@ -99,6 +115,14 @@ namespace CS_3505_Project_06
             return mNetworkSession;\r
         }\r
 \r
+        // added to begin the game. I made the LobbyGUI make sure that only the host will call it when everyone is ready.\r
+        // This is already taken care of in the update method below. But it may be nice to allow the host to signal the start\r
+        // rather then having it start automatically. Just a suggestion. \r
+        //    -Brady\r
+        public void StartGame()\r
+        {\r
+            mNetworkSession.StartGame();\r
+        }\r
 \r
         public void LeaveSession()\r
         {\r
This page took 0.021593 seconds and 4 git commands to generate.