summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2018-04-21 22:03:33 +0200
committerNoah Loomans <noahloomans@gmail.com>2018-04-21 22:03:33 +0200
commit69ae6ada12cd1b2e6b6e4dbf3db55ae22932d17d (patch)
tree140d477cd8a765a1834fd26e76c88d22f1fd605e
parent9b0f17494440f3d5d2f711a2fd20c2ca8970db21 (diff)
Start at a random position
-rw-r--r--main.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.rb b/main.rb
index 0d7591d..4a3d52b 100644
--- a/main.rb
+++ b/main.rb
@@ -11,7 +11,7 @@ class MazeGenerator
def generate()
@visitedCells = [@currentPos]
- @stack = [Pos.new(0, 0)]
+ @stack = [Pos.new(rand(@maze.width), rand(@maze.height))]
while !@stack.empty?
step()