collide ( world: terrain-world player: player -- )


Vocabulary
terrain

Inputs and outputs
worlda terrain-world
playera player


Definition


TYPED:: collide ( world: terrain-world player: player -- )
world terrain-segment>> :> segment player location>>
:> location segment location (collide)
:> location' location location' = not [
player location' >>location
[ BOUNCE v* ] change-velocity drop
] when ;