hi Kassen,

a found two possible causes:

- the cond syntax is wrong, it should be
        (cond [test-expr then-expr])
  instead of
        (cond test-expr then-expr)

- the result of andmap should not be negated probably, since you want to make sure that all distances are bigger than the radius.

(define (position-cube)
    (let ((spot (vector (* 4.5 (crndf)) (* 4.5 (crndf)) .5)))
        (cond
            [(andmap
                    (lambda (element)
                        (> (vdist spot (object-pos element))
                           (object-radius element)))
                    myworld)
             (place-cube spot)])))


best,
gabor

Reply via email to