From 69ae6ada12cd1b2e6b6e4dbf3db55ae22932d17d Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sat, 21 Apr 2018 22:03:33 +0200 Subject: Start at a random position --- main.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- cgit v1.1