public void testGameStateConstructor() { byte numberOfPins = 4; byte numberOfColors = 4; byte numberOfTries = 4; bool computerIsPlaying = true; GameState newState = new GameState(numberOfTries, numberOfPins, numberOfColors, computerIsPlaying); Assert.AreEqual(computerIsPlaying, newState.ComputerIsPlaying); Assert.AreEqual(numberOfColors, newState.NrOfAvailableColors); Assert.AreEqual(numberOfTries, newState.NrOfTries); Assert.AreEqual(numberOfPins, newState.NrOfPins); }/*testGameStateConstructor*/
} /*GameDateTime*/ #endregion Properties #region Constructor public SavedGame(GameState game) { this.game = game; gameDateTime = DateTime.Now; } /*SavedGame*/
} /*Mastermind*/ public Mastermind(GameState settings) { gameState = settings; if (GameState.NrOfAvailableColors <= 8 && GameState.NrOfPins <= 8) { mSolver = new MastermindSolver(ref gameState); } } /*Mastermind*/