Maze Generator and Solver in Ruby