]> Dogcows Code - chaz/carfire/blobdiff - Project06/CS 3505 Project 06/CS 3505 Project 06/CS 3505/TestHarness.cs
Fixed last synchronization problem (I hope).
[chaz/carfire] / Project06 / CS 3505 Project 06 / CS 3505 Project 06 / CS 3505 / TestHarness.cs
index 76bc066fb1ba636bd2b2a19ef4dc0578cba89762..883e8a09676d15b86615d228fa0a7c12042118af 100644 (file)
@@ -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.023831 seconds and 4 git commands to generate.