Example #1
0
        public void checkGridLength()
        {
            int[][] islandGrid = new int[][]
            {
                new int [] { 0, 0, 0 },
                new int [] { 0, 0, 0 },
                new int [] { 0, 0, 0 },
            };

            var islandExplorer = new IslandExplorer();

            Assert.IsTrue(islandExplorer.checkGridLength(islandGrid));
        }
Example #2
0
        public void checkThreeSizeIsland_Down()
        {
            int[][] islandGrid = new int[][]
            {
                new int [] { 1, 0, 0 },
                new int [] { 1, 0, 0 },
                new int [] { 1, 0, 1 },
            };

            var islandExplorer = new IslandExplorer();

            Assert.IsTrue(islandExplorer.checkGridLength(islandGrid));
            Assert.AreEqual(3, islandExplorer.search(0, 0, islandGrid));
        }