ballworld.model.strategy
Class Change2Strategy

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

public class Change2Strategy
extends java.lang.Object
implements IUpdateStrategy

This strategy does nothing (i.e. goes straight) until after a certian number of updates, it will change the context's strategy to a Change1Strategy.

Author:
swong

Field Summary
private  int count
          The number of updates before the host's strategy is changed.
 
Constructor Summary
Change2Strategy()
           
 
Method Summary
 void updateState(Ball context)
          Do nothing unless the count has gone to zero, then change the context's strategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

count

private int count
The number of updates before the host's strategy is changed.

Constructor Detail

Change2Strategy

public Change2Strategy()
Method Detail

updateState

public void updateState(Ball context)
Do nothing unless the count has gone to zero, then change the context's strategy

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