public class MultiStrategy extends java.lang.Object implements IUpdateStrategy
Modifier and Type | Field and Description |
---|---|
private IUpdateStrategy |
_s1
One of the composee strategies
|
private IUpdateStrategy |
_s2
Another one of the composee strategies
|
Constructor and Description |
---|
MultiStrategy(IUpdateStrategy s1,
IUpdateStrategy s2)
Constructor for the class
|
Modifier and Type | Method and Description |
---|---|
void |
updateState(Ball context,
Dispatcher disp)
Update each composee strategy in turn.
|
private IUpdateStrategy _s1
private IUpdateStrategy _s2
public MultiStrategy(IUpdateStrategy s1, IUpdateStrategy s2)
s1
- One of the composee strategiess2
- Another one of the composee strategiespublic void updateState(Ball context, Dispatcher disp)
updateState
in interface IUpdateStrategy
context
- The host ball for this strategy.disp
- The dispatcher to use if necessary