Implements cellular automata, closes #13
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
require "math"
|
||||
DrunkenWalk = {
|
||||
curr_x = 0,
|
||||
curr_y = 0,
|
||||
@@ -8,9 +7,10 @@ DrunkenWalk = {
|
||||
}
|
||||
|
||||
function DrunkenWalk:initialize(w, h)
|
||||
math.randomseed(os.time())
|
||||
math.randomseed()
|
||||
self.map_w = w
|
||||
self.map_h = h
|
||||
self.iterations = 30
|
||||
visualizer.map:fill(true)
|
||||
self.curr_x = math.random(0, w-1)
|
||||
self.curr_y = math.random(0, h-1);
|
||||
|
||||
Reference in New Issue
Block a user