public class BreathingStrategy extends java.lang.Object implements IUpdateStrategy
Modifier and Type | Field and Description |
---|---|
private IRandomizer |
rand
Randomizer utility for setting the sinusoid.
|
private SineMaker |
sm
Sinusoid generator, randomly initialized.
|
Constructor and Description |
---|
BreathingStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
updateState(Ball context,
Dispatcher disp)
Set the context's radius to the next value in the sinusoid.
|
private IRandomizer rand
private SineMaker sm
public void updateState(Ball context, Dispatcher disp)
updateState
in interface IUpdateStrategy
context
- The host ball for this strategydisp
- The dispatcher to use if necessary