         centerOn = value
         return self
     }
-    
-    private var needsUpdate: Bool = false
     
     public var bounds: CGRect {
         guard self.nodes.count > 0 else { return CGRectZero }

    public func unfix(node: Node) -> Graph {
        // TODO: Check that 'nodes' contains 'node'
        node.unfix()
        needsUpdate = true
        return self
    }
    
    private func totalEnergy() -> CGFloat {
        return nodes.reduce(0) { (sum, node) -> CGFloat in
            let v = node.velocity.magnitude
            return sum + 0.5 * node.mass * v * v
        }
    }
}

extension Graph {

            step()
            closure(nodes)
            needsUpdate = false
        }
    }
    
    private func totalEnergy() -> CGFloat {
        return nodes.reduce(0) { (sum, node) -> CGFloat in
            let v = node.velocity.magnitude
            return sum + 0.5 * node.mass * v * v
        }
    }
    
