It was giving runtime error(ArrayOutOfBounds) when i want to create a rectangular maze.