Ejemplo n.º 1
0
        public void GapRulesOf_3_l15()
        {
            PicrossLineRuleTester lineRule = new PicrossLineRuleTester(new[] { 3 }, 15);
            var gapRules = lineRule.GetGapRules();

            var expectedGapRules = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(0, 12),
                new Tuple <int, int>(0, 12),
            };

            Assert.True(gapRules.SequenceEqual(expectedGapRules));
        }
Ejemplo n.º 2
0
        public void GapRulesOf_5_3_l10()
        {
            var lineRule = new PicrossLineRuleTester(new [] { 5, 3 }, 10);
            var gapRules = lineRule.GetGapRules();

            var expectedGapRules = new List <Tuple <int, int> >()
            {
                new Tuple <int, int>(0, 1),
                new Tuple <int, int>(1, 2),
                new Tuple <int, int>(0, 1)
            };

            Assert.True(gapRules.SequenceEqual(expectedGapRules));
        }
Ejemplo n.º 3
0
        public void GapStructuresOf_5_3_l10()
        {
            PicrossLineRuleTester lineRule = new PicrossLineRuleTester(new[] { 5, 3 }, 10);
            var gapRules      = lineRule.GetGapRules();
            var gapStructures = lineRule.GenerateGapStructures(gapRules, lineRule.VoidCellCount);

            var expectedGapStructures = new List <IEnumerable <int> >()
            {
                new List <int>()
                {
                    1, 1, 0
                },
                new List <int>()
                {
                    0, 2, 0
                },
                new List <int>()
                {
                    0, 1, 1
                }
            };

            Assert.True(AreEqualGapStructures(gapStructures, expectedGapStructures));
        }