public void NumberOfPuzzlesGeneratedInABatchAreCorrect()
        {
            IEnumerable <Puzzle <int> > PuzzleList;

            numberPuzzleBatchBuilder.BuildPuzzleBatch();
            PuzzleList = numberPuzzleBatchBuilder.GetPuzzleBatch();

            if (!(PuzzleList.ToList().Count() == 10))
            {
                Assert.Fail();
            }
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            PuzzleBatchBuilder.BuildPuzzleBatch();
            puzzleBatchBuilderDirector.BuildPuzzleBatch(PuzzleBatchBuilder);

            var listOfPuzzle = PuzzleBatchBuilder.GetPuzzleBatch();

            foreach (var puzzle in listOfPuzzle)
            {
                this.listBox1.Items.Add(string.Join(",", puzzle.PuzzleDisplay.ToArray()) + "## Answer Options" + string.Join(",", puzzle.AnswerOptions.ToArray()) + " ## Answer" + puzzle.CorrectAnswer.ToString());
            }
        }
示例#3
0
 public void BuildPuzzleBatch <PuzzleDataType>(IPuzzleBatchBuilder <PuzzleDataType> puzzleBatchBuilder)
 {
     puzzleBatchBuilder.BuildPuzzleBatch();
 }