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