ballworld.model.strategy
Class MultiStrategy

java.lang.Object
  extended by ballworld.model.strategy.MultiStrategy
All Implemented Interfaces:
IUpdateStrategy

public class MultiStrategy
extends java.lang.Object
implements IUpdateStrategy

A composite strategy of two strategies.

Author:
swong

Field Summary
private  IUpdateStrategy _s1
          One of the composee strategies
private  IUpdateStrategy _s2
          Another one of the composee strategies
 
Constructor Summary
MultiStrategy(IUpdateStrategy s1, IUpdateStrategy s2)
          Constructor for the class
 
Method Summary
 void updateState(Ball context)
          Update each composee strategy in turn.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_s1

private IUpdateStrategy _s1
One of the composee strategies


_s2

private IUpdateStrategy _s2
Another one of the composee strategies

Constructor Detail

MultiStrategy

public MultiStrategy(IUpdateStrategy s1,
                     IUpdateStrategy s2)
Constructor for the class

Parameters:
s1 - One of the composee strategies
s2 - Another one of the composee strategies
Method Detail

updateState

public void updateState(Ball context)
Update each composee strategy in turn.

Specified by:
updateState in interface IUpdateStrategy
Parameters:
context - The host ball for this strategy.