Removes the test alog, cleans up some renderer stuff, starts work on cellular automata, closes #14
This commit is contained in:
11
scripts/algorithms/cellular_auotmata.lua
Normal file
11
scripts/algorithms/cellular_auotmata.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
CellularAutomata = {}
|
||||
|
||||
function CellularAutomata:initialize(w, h)
|
||||
|
||||
end
|
||||
|
||||
function CellularAutomata:update()
|
||||
return true
|
||||
end
|
||||
|
||||
visualizer.algorithm_manager:register_algorithm("Cellular Automata", function (w, h) CellularAutomata:initialize() end, function () return CellularAutomata:update() end, 1)
|
||||
@@ -1,18 +0,0 @@
|
||||
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