Esempio n. 1
0
        public void TestMovement7()
        {
            var row = new List <int> {
                -1, 2, -7, 2, 2, 0, -2, 2, -10
            };

            BoardUtils.MoveInArray(row, 5, out var sectionMoved, out int moved, out int pushsize);
            S(row, new List <int> {
                -1, 2, -7, 2, 2, -3, 0, 1, -9
            });
            Assert.AreEqual(1, sectionMoved);
            Assert.AreEqual(3, moved);
            Assert.AreEqual(1, pushsize);
        }
Esempio n. 2
0
        public void TestMovement5C()
        {
            var row = new List <int> {
                -1, 0, -1, 2, 1, -1
            };

            BoardUtils.MoveInArray(row, 1, out var sectionMoved, out int moved, out int pushsize);
            S(row, new List <int> {
                -3, 0, 2, -1
            });
            Assert.AreEqual(0, sectionMoved);
            Assert.AreEqual(2, moved);
            Assert.AreEqual(2, pushsize);
        }
Esempio n. 3
0
        public void TestMovement5G()
        {
            var row = new List <int> {
                1, -1, 0, -2, 1, 2, -3
            };

            BoardUtils.MoveInArray(row, 2, out var sectionMoved, out int moved, out int pushsize);
            S(row, new List <int> {
                1, -4, 0, 2, -3
            });
            Assert.AreEqual(0, sectionMoved);
            Assert.AreEqual(3, moved);
            Assert.AreEqual(0, pushsize);
        }
Esempio n. 4
0
        public void TestMovement2()
        {
            var row = new List <int> {
                0, -1, 2, -1
            };

            BoardUtils.MoveInArray(row, 0, out var sectionMoved, out int moved, out int pushsize);
            S(row, new List <int> {
                -2, 0, 1
            });
            Assert.AreEqual(1, sectionMoved);
            Assert.AreEqual(2, moved);
            Assert.AreEqual(1, pushsize);
        }