maze

maze generator

$ ruby maze_generator.rb
What is a horizontal size of the maze you want to generate? (Enter a positive integer):
20
What is a Vertical size of the maze you want to generate? (Enter a positive integer):
10

pretty print
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|       |                                               |                       |
+   +---+   +---+---+---+---+   +---+---+---+---+---+   +---+   +---+---+---+---+
|   |       |               |   |                           |   |               |
+   +   +---+---+---+   +   +   +---+---+---+---+---+---+   +   +   +---+---+   +
|                       |   |   |                   |       |   |       |       |
+---+---+---+---+---+---+   +   +   +---+---+---+   +   +---+   +---+   +   +---+
|               |       |   |   |               |   |           |       |       |
+   +---+---+   +---+   +   +   +---+---+---+   +---+---+---+---+   +---+---+   +
|           |       |       |               |   |                   |           |
+   +---+   +---+   +   +---+---+   +---+   +   +   +---+---+---+---+   +---+---+
|   |       |   |   |           |   |       |       |               |       |   |
+---+   +---+   +   +---+---+---+   +---+---+---+---+---+---+---+   +---+   +   +
|       |       |       |           |                                   |   |   |
+   +---+   +   +---+   +   +   +---+   +   +---+---+---+---+---+   +---+   +   +
|       |   |       |   |   |   |       |           |               |       |   |
+   +   +---+   +   +   +   +   +   +---+---+---+   +---+---+---+---+   +---+   +
|   |       |   |           |   |   |       |   |   |       |           |       |
+   +---+   +---+---+---+---+---+   +   +   +   +   +   +   +   +---+---+   +   +
|       |                               |       |       |                   |   |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

regular print
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |                       |           |
+ +-+ +-+-+-+-+ +-+-+-+-+-+ +-+ +-+-+-+-+
| |   |       | |             | |       |
+ + +-+-+-+ + + +-+-+-+-+-+-+ + + +-+-+ +
|           | | |         |   | |   |   |
+-+-+-+-+-+-+ + + +-+-+-+ + +-+ +-+ + +-+
|       |   | | |       | |     |   |   |
+ +-+-+ +-+ + + +-+-+-+ +-+-+-+-+ +-+-+ +
|     |   |   |       | |         |     |
+ +-+ +-+ + +-+-+ +-+ + + +-+-+-+-+ +-+-+
| |   | | |     | |   |   |       |   | |
+-+ +-+ + +-+-+-+ +-+-+-+-+-+-+-+ +-+ + +
|   |   |   |     |                 | | |
+ +-+ + +-+ + + +-+ + +-+-+-+-+-+ +-+ + +
|   | |   | | | |   |     |       |   | |
+ + +-+ + + + + + +-+-+-+ +-+-+-+-+ +-+ +
| |   | |     | | |   | | |   |     |   |
+ +-+ +-+-+-+-+-+ + + + + + + + +-+-+ + +
|   |               |   |   |         | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+