nature-of-code/The-Nature-of-Code-archive

Fluid resistance section: methods on Liquid or Mover?

pamelafox opened this issue · 4 comments

The Fluid resistance section starts off by saying we'll add 2 method to Liquid, and the P5 examples port has those methods on Liquid, but then the code all has them on Mover. Which do you prefer?

Ah, good point. I'm not sure when this got switched. I clearly wrote the text with the method in Mover and at some point moved things around in the actual code examples. I don't actually have a preference as I could make the case for either. I think I like the idea of the method being in the liquid class as the liquid acts on the mover, i.e.

liquid.drags(movers);

Open to suggestion.

Great, I'm leaving this open so I remember to revisit at some point.

Fixed in new book repo!