Pushing whats there
This commit is contained in:
@@ -3,14 +3,14 @@ DrunkenWalk = {
|
||||
curr_y = 0,
|
||||
map_w = 0,
|
||||
map_h = 0,
|
||||
iterations = 30
|
||||
iterations = 0
|
||||
}
|
||||
|
||||
function DrunkenWalk:initialize(w, h)
|
||||
math.randomseed()
|
||||
self.map_w = w
|
||||
self.map_h = h
|
||||
self.iterations = 30
|
||||
self.iterations = 200
|
||||
visualizer.map:fill(true)
|
||||
self.curr_x = math.random(0, w-1)
|
||||
self.curr_y = math.random(0, h-1);
|
||||
@@ -33,4 +33,4 @@ function DrunkenWalk:update()
|
||||
return false
|
||||
end
|
||||
|
||||
visualizer.algorithm_manager:register_algorithm("Drunken Walk", function (w, h) DrunkenWalk:initialize(w, h) end, function () return DrunkenWalk:update() end, 5)
|
||||
visualizer.algorithm_manager:register_algorithm("Drunken Walk", function (w, h) DrunkenWalk:initialize(w, h) end, function () return DrunkenWalk:update() end, 60)
|
||||
Reference in New Issue
Block a user