summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.rb2
-rw-r--r--maze_generator.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/main.rb b/main.rb
index 19f8376..1d0a85c 100644
--- a/main.rb
+++ b/main.rb
@@ -1,5 +1,5 @@
require_relative 'maze_generator'
mazeGenerator = MazeGenerator.new(ARGV[0].to_i, ARGV[1].to_i)
-mazeGenerator.generate
+mazeGenerator.generate!
puts mazeGenerator.maze
diff --git a/maze_generator.rb b/maze_generator.rb
index 9797624..6a0bf7b 100644
--- a/maze_generator.rb
+++ b/maze_generator.rb
@@ -9,7 +9,7 @@ class MazeGenerator
@visitedTiles = Array.new(width) { Array.new(height) { false } }
end
- def generate()
+ def generate!()
@visitedCells = [@currentPos]
@stack = [Pos.new(rand(@maze.width), rand(@maze.height))]