示例#1
0
 public void TestLevel2Description()
 {
     var field = new Field(2, 5, 2, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {6, 7, 8, 9, 10, 5, 4, 3, 2, 1}));
     field = new Field(5, 2, 5, 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {10, 9, 7, 8, 6, 5, 3, 4, 2, 1}));
 }
示例#2
0
 public void TestLevel3Description()
 {
     var field = new Field(3, 4, 1, 1, 'S');
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 5, 9, 10, 6, 2, 3, 7, 11, 12, 8, 4}));
     field = new Field(5, 2, 5, 2, 'N');
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {10, 8, 6, 4, 2, 1, 3, 5, 7, 9}));
 }
示例#3
0
        public void TestLevel1Description()
        {
            var field = new Field(3, 4);
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 2, 3, 4, 8, 7, 6, 5, 9, 10, 11, 12}));
            var field2 = new Field(2, 5);
            Assert.That(field2.GetSequence(), Is.EqualTo(new[] {1, 2, 3, 4, 5, 10, 9, 8, 7, 6}));

            PrintSequence(new Field(3, 4).GetSequence());
            PrintSequence(new Field(2, 5).GetSequence());
            PrintSequence(new Field(5, 2).GetSequence());
            PrintSequence(new Field(23, 12).GetSequence());
        }
示例#4
0
 public void TestLevel2Self()
 {
     var field = new Field(2, 5, 2, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {6, 7, 8, 9, 10, 5, 4, 3, 2, 1}));
     field = new Field(2, 2, 1, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 2, 4, 3}));
     field = new Field(2, 2, 1, 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 2, 1, 3, 4 }));
     field = new Field(2, 2, 2, 1);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 3, 4, 2, 1 }));
     field = new Field(2, 2, 2, 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 4, 3, 1, 2 }));
 }
示例#5
0
        public void TestLevel3Self()
        {
            var field = new Field(2, 2, 1, 1, 'O');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 2, 4, 3}));

            field = new Field(2, 2, 1, 1, 'S');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 1, 3, 4, 2 }));

            field = new Field(2, 2, 1, 2, 'S');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 2, 4, 3, 1 }));

            field = new Field(2, 2, 1, 2, 'W');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 2, 1, 3, 4 }));

            field = new Field(2, 2, 2, 2, 'W');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 4, 3, 1, 2 }));

            field = new Field(2, 2, 2, 2, 'N');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 4, 2, 1, 3 }));

            field = new Field(2, 2, 2, 1, 'N');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 3, 1, 2, 4 }));

            field = new Field(2, 2, 2, 1, 'O');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 3, 4, 2, 1 }));
        }
示例#6
0
 public void TestLevel5Description()
 {
     var field = new Field(5, 4, 1, 1, 'O', 'S', 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 1, 5, 2, 6, 3, 7, 4, 8, 16, 12, 15, 11, 14, 10, 13, 9, 17, 18, 19, 20 }));
     field = new Field(5, 4, 4, 1, 'O', 'Z', 2);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] { 13, 17, 14, 18, 15, 19, 16, 20, 8, 4, 7, 3, 6, 2, 5, 1, 9, 10, 11, 12 }));
 }
示例#7
0
        public void TestLevel4Self()
        {
            var field = new Field(3, 4, 1, 4, 'W', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {4, 3, 2, 1, 9, 10, 11, 12, 8, 7, 6, 5}));

            field = new Field(3, 4, 1, 1, 'O', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] { 1, 2, 3, 4, 12, 11, 10, 9, 5, 6, 7, 8 }));

            field = new Field(3, 4, 3, 4, 'W', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {12, 11, 10, 9, 1, 2, 3, 4, 8, 7, 6, 5}));

            field = new Field(3, 4, 3, 4, 'N', 'Z');
            Assert.That(field.GetSequence(), Is.EqualTo(new[] {12, 8, 4, 1, 5, 9, 11, 7, 3, 2, 6, 10}));
        }
示例#8
0
 public void TestLevel7Description()
 {
     var field = new Field(5, 4, 1, 1, 'O', 'S', 3);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12, 0, 20, 16, 0, 19, 15, 0, 18, 14, 0, 17, 13}));
     field = new Field(5, 4, 3, 1, 'O', 'Z', 3);
     Assert.That(field.GetSequence(), Is.EqualTo(new[] {9, 13, 17, 10, 14, 18, 11, 15, 19, 12, 16, 20, 8, 4, 0, 7, 3, 0, 6, 2, 0, 5, 1, 0}));
 }