]> Dogcows Code - chaz/carfire/blobdiff - Project06/CS 3505 Project 06/CS 3505 Project 06/CS 3505/TestHarness.cs
Added a basic timeout feature so you'll at least get bumped back to the lobby after...
[chaz/carfire] / Project06 / CS 3505 Project 06 / CS 3505 Project 06 / CS 3505 / TestHarness.cs
index 76bc066fb1ba636bd2b2a19ef4dc0578cba89762..2b32ef08d76863a0bb8af9c98d5d59f940dcb95b 100644 (file)
@@ -64,8 +64,8 @@ namespace CS_3505_Project_06.CS_3505
 \r
             for (int player = 0; player < 4; player++)\r
             {\r
-                if (isGameOver[player])\r
-                    continue;\r
+                //if (isGameOver[player])\r
+                //    continue;\r
 \r
                 if (inputs.mousePressedChanged[player])\r
                     mouseButton[player] = inputs.mousePressed[player];\r
@@ -224,12 +224,14 @@ namespace CS_3505_Project_06.CS_3505
 \r
         public void ResetGame(Object[] playerIdentifiers, Object thisPlayer)\r
         {\r
-            if (playerIdentifiers.Length != 4)\r
-                throw new Exception("This game requires four players.");\r
+            //if (playerIdentifiers.Length != 4)\r
+            //    throw new Exception("This game requires four players.");\r
 \r
             // Copy the player identifiers - do not rely on the array parameter not changing.\r
 \r
-            for (int i = 0; i < 4; i++)\r
+            // Now the test harness will at least run with less than 4 players...\r
+            int numPlayers = playerIdentifiers.Count();\r
+            for (int i = 0; i < numPlayers; i++)\r
                 this.playerIdentifiers[i] = playerIdentifiers[i];\r
 \r
             // Create new game state and inputs objects.\r
This page took 0.020587 seconds and 4 git commands to generate.