HTDP/2e exercise 219 help

38 views
Skip to first unread message

Aron Zvi

unread,
Dec 1, 2019, 8:49:42 AM12/1/19
to Racket Users
Hey Guys,

I'm having trouble with exercise 219.

I'm following the hint and interpreting “eating” that the head moves where the food used to be located. My problem is that I need to the food to be (randomly) placed only where the worm head can exactly reach it.
The worm moves at a fixed increment (speed) and I assume I would need the random food to be at a position divisible by the worm's speed. However, the functions provided for food creation in figure 80 will generate a a standard random position and I am left with food that my worm cannot eat

You help is mostly appreciated


Reply all
Reply to author
Forward
0 new messages