X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=Project06%2FCS%203505%20Project%2006%2FCS%203505%20Project%2006%2FCS%203505%2FTestHarness.cs;h=883e8a09676d15b86615d228fa0a7c12042118af;hb=d77039298ad2420042b26799c0afdb916572f2b0;hp=76bc066fb1ba636bd2b2a19ef4dc0578cba89762;hpb=42efba22e3fea35522ba3d65d830b2d15718e699;p=chaz%2Fcarfire diff --git a/Project06/CS 3505 Project 06/CS 3505 Project 06/CS 3505/TestHarness.cs b/Project06/CS 3505 Project 06/CS 3505 Project 06/CS 3505/TestHarness.cs index 76bc066..883e8a0 100644 --- a/Project06/CS 3505 Project 06/CS 3505 Project 06/CS 3505/TestHarness.cs +++ b/Project06/CS 3505 Project 06/CS 3505 Project 06/CS 3505/TestHarness.cs @@ -224,12 +224,14 @@ namespace CS_3505_Project_06.CS_3505 public void ResetGame(Object[] playerIdentifiers, Object thisPlayer) { - if (playerIdentifiers.Length != 4) - throw new Exception("This game requires four players."); + //if (playerIdentifiers.Length != 4) + // throw new Exception("This game requires four players."); // Copy the player identifiers - do not rely on the array parameter not changing. - for (int i = 0; i < 4; i++) + // Now the test harness will at least run with less than 4 players... + int numPlayers = playerIdentifiers.Count(); + for (int i = 0; i < numPlayers; i++) this.playerIdentifiers[i] = playerIdentifiers[i]; // Create new game state and inputs objects.