HasSolution() 공개 메소드

public HasSolution ( ) : bool
리턴 bool
예제 #1
0
        public void HasSolution3x1()
        {
            Pattern pattern = new Pattern(3, 1);

            pattern.SetRow(0, "1 2 1");

            Assert.IsTrue(pattern.HasSolution());
        }
예제 #2
0
        public void HasSolution2x2()
        {
            Pattern pattern = new Pattern(2, 2);

            pattern.SetRow(0, "1 2");
            pattern.SetRow(1, "4 3");

            Assert.IsFalse(pattern.HasSolution());
        }
예제 #3
0
        public void HasSolution5x5()
        {
            Pattern pattern = new Pattern(5, 5);

            pattern.SetRow(0, "2 2 2 2 2");
            pattern.SetRow(1, "2 1 1 1 2");
            pattern.SetRow(2, "2 1 2 1 2");
            pattern.SetRow(2, "2 1 1 1 2");
            pattern.SetRow(2, "2 2 2 2 2");

            Assert.IsFalse(pattern.HasSolution());
        }
예제 #4
0
        public void HasSolution3x3()
        {
            Pattern pattern = new Pattern(3, 3);

            pattern.SetRow(0, "2 1 2");
            pattern.SetRow(1, "1 1 1");
            pattern.SetRow(2, "2 1 2");

            Assert.IsTrue(pattern.HasSolution());
        }