public interface WordNudger
WordCram gets a PVector from the nudger, and adds it to the word's desired location, to find the next spot to try fitting the word. Note that the PVectors returned from a nudger don't accumulate: if the placer puts a Word at (0, 0), and the nudger returns (1, 1), and then (2, 2), WordCram will try the word at (1, 1), and then (2, 2) -- not (1, 1) and then (3, 3).
A WordNudger should probably start nudging the word only a little, to keep it
near its desired location, and gradually nudge it more and more, so that,
even if the desired area is congested, the word can still fit in somewhere.
This is why the WordCram passes in attemptNumber: it's the
number of times it's attempted to place the word. This could (for example)
scale the PVector, since the nudges don't accumulate (see above).
RandomWordNudger,
SpiralWordNudgerprocessing.core.PVector nudgeFor(Word word, int attemptNumber)
word - the word to nudgeattemptNumber - how many times WordCram has tried to place this word; starts
at zero, and ends at
(int)((1.0-word.weight) * 600) + 100