static void Main(string[] args) { using (System.IO.StreamWriter output = new System.IO.StreamWriter("ExperimentResults.txt")) { for (var i = 0; i < 50; ++i) { var guesses = 0; MastermindGame puzzle = new MastermindGame(4, 8); MastermindAI player = new MastermindAI(puzzle); var result = player.Solve(ref guesses); output.WriteLine("{0}\t{1}", result, result ? guesses.ToString() : "-"); } } }
public MastermindAI(MastermindGame puzzle) { puzzleBoard = puzzle; }