Exemple #1
0
        public void GridShouldBeAbleToReportUnusedNumbers()
        {
            var arrayInput = new int[3, 3] {
                { 2, 3, 4 }, { 9, 0, 5 }, { 0, 7, 0 }
            };
            var grid = new DelacorteGrid(arrayInput);

            grid.IdentifyUnusedValues().ShouldBeEquivalentTo(new[] { 1, 6, 8 });
        }
Exemple #2
0
        public void FilledGridShouldReportNoMissingNumbers()
        {
            var arrayInput = new int[3, 3] {
                { 2, 3, 4 }, { 9, DelacorteGrid.UNSPECIFIED, 5 }, { DelacorteGrid.UNSPECIFIED, 7, DelacorteGrid.UNSPECIFIED }
            };
            var providedPermutation = new[] { 1, 6, 8 };
            var filledGrid          = new DelacorteGrid(arrayInput).FillToCreateNewGrid(providedPermutation);

            filledGrid.IdentifyUnusedValues().ShouldBeEquivalentTo(new int[] { });
        }