Exemplo n.º 1
0
        public void InvalidMoveEmptyCellTest()
        {
            GameField gameField = new GameField();
            SetGameFieldBody(gameField, new int[,]
            {
                { 1, 2, 3, 4 },
                { 5, 6, 7, 8 },
                { 9, 10, 11, 12 },
                { 13, 14, 15, 16 }
            });

            gameField.MoveEmptyCell(4, 3);
        }
Exemplo n.º 2
0
        public void MoveEmptyCellTest2()
        {
            GameField gameField = new GameField();
            SetGameFieldBody(gameField, new int[,]
            {
                { 1, 2, 3, 4 },
                { 5, 6, 7, 8 },
                { 9, 10, 16, 11 },
                { 13, 14, 15, 12 }
            });

            gameField.MoveEmptyCell(2, 3);
            int[,] expected =
            {
                { 1, 2, 3, 4 },
                { 5, 6, 7, 8 },
                { 9, 10, 11, 16 },
                { 13, 14, 15, 12 }
            };

            CollectionAssert.AreEqual(gameField.Body, expected);
        }