         open-window
     ] with-ui ;
 
+MAIN: chipmunk-demo

    cpBodyAlloc 1.0 NAN: 0 cpBodyInit
    x y cpv >>p :> body
    cpCircleShapeAlloc body 0.95 0 0 cpv cpCircleShapeInit
    [ shape>> 0 >>e ] [ shape>> 0 >>u ] bi drop ;

TUPLE: chipmunk-world < game-world
    space ;

    space arbiters>>
    [ num>> ] [ arr>> swap <direct-void*-array> ] bi [
        cpArbiter memory>struct
        [ numContacts>> ] [ contacts>> >c-ptr swap <direct-cpContact-array> ] bi [
            p>> [ x>> ] [ y>> ] bi glVertex2f
        ] each
    ] each
