     var split_rate: Float // rate at which random splits happen
     var num_steps: Float  // how many steps have happened
     var num_splits: Float // how many splits have happened
-    
-    static var s: AntSettings = AntSettings()
-    
-    init(x: Int, y: Int, dx: Int, dy: Int, time: Float) {
+    var s: AntSettings! = nil
+    
+    init(x: Int, y: Int, dx: Int, dy: Int, time: Float, s: AntSettings) {
         self.x = x
         self.y = y
         self.dx = dx
         self.dy = dy
+        self.s = s
         split_t = time
-        split_dt = Ant.s.split_dt_start
-        split_rate = Ant.s.split_rate_start
+        split_dt = s.split_dt_start
+        split_rate = s.split_rate_start
         num_steps = 0
         num_splits = 0
     }

        split_rate = splitFrom.split_rate
        num_steps = splitFrom.num_steps
        num_splits = splitFrom.num_splits
    }
    
    func in_bounds(#x: Int, y: Int) -> Bool {
        return (0 <= x && x < Ant.s.w && 0 <= y && y < Ant.s.h)
    }
    
    func is_background(pixels: [PixelData], x: Int, y: Int) -> Bool {
        if (!in_bounds(x: x, y: y)) {
            return false
        }
        let p = pixels[Ant.s.w * y + x]
        return (p.r == Ant.s.bg_color.r && p.g == Ant.s.bg_color.g &&
                p.b == Ant.s.bg_color.b && p.a == Ant.s.bg_color.a)
    }
    
    func path_blocked(pixels: [PixelData]) -> Bool {
        var px = x
        var py = y
        for i in 1...Ant.s.padding {
            px += dx
            py += dy
            if (!is_background(pixels, x: px, y: py)) {

            g = 255;
            b = 255;
        }
        pixels[s.w * y + x] = PixelData(r:r, g:g, b:b, a:255)
    }
}

