def update_objects(self): for i in self.objects: force = Vector(0, 0, 0) for j in self.objects: if i != j: force.add(Physics.Force(i, j)) if i.get_location().distance(j.get_location()) <= i.get_diameter()/2 + j.get_diameter()/2: self.collision = True self.dt = 0 acceleration = Physics.acc(i, force) i.update(acceleration, self.dt)