Drunken walk working but needs some updates as it can go 'off map' and then walk back in, effectively
This commit is contained in:
18
scripts/algorithms/test.lua
Normal file
18
scripts/algorithms/test.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
Test = {}
|
||||
|
||||
function Test.initialize(w, h)
|
||||
visualizer.map:fill(false)
|
||||
for mx = 0, w-1 do
|
||||
for my = 0, h-1 do
|
||||
if mx == 0 or mx == w-1 or my == 0 or my == h-1 then
|
||||
visualizer.map:draw_wall(mx, my)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Test.update()
|
||||
|
||||
end
|
||||
|
||||
visualizer.algorithm_manager:register_algorithm("Test", Test.initialize, Test.update, 1)
|
||||
Reference in New Issue
Block a user