|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectballworld.model.strategy.BreathingStrategy
public class BreathingStrategy
Strategy to change the context ball's radius in a random sinusoidal manner
| Field Summary | |
|---|---|
private IRandomizer |
rand
Randomizer utility for setting the sinusoid. |
private SineMaker |
sm
Sinusoid generator, randomly initialized. |
| Constructor Summary | |
|---|---|
BreathingStrategy()
|
|
| Method Summary | |
|---|---|
void |
updateState(Ball context)
Set the context's radius to the next value in the sinusoid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private IRandomizer rand
private SineMaker sm
| Constructor Detail |
|---|
public BreathingStrategy()
| Method Detail |
|---|
public void updateState(Ball context)
updateState in interface IUpdateStrategycontext - The host ball for this strategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||