ballwar.model.strategy
Class ANoOpStrategy

java.lang.Object
  extended by ballwar.model.strategy.ANoOpStrategy
All Implemented Interfaces:
IUpdateStrategy
Direct Known Subclasses:
BreathingStrategy, ColorStrategy, CurveStrategy, ExplodeStrategy, HeavyStrategy, KillStrategy, LightUpStrategy, MoveStrategy, MultiStrategy, RockStrategy, ScoreStrategy, WanderStrategy

public abstract class ANoOpStrategy
extends Object
implements IUpdateStrategy

Abstract strategy that provides default behaviors that do nothing. Differs from the IUpdateStrategy.NullObject in that the purpose of this class is for subclassing, not to represent the null entity.


Field Summary
 
Fields inherited from interface ballwar.model.IUpdateStrategy
NullObject
 
Constructor Summary
ANoOpStrategy()
           
 
Method Summary
 void init(Ball context)
          No-op
 void updateCollision(Ball context, Ball target)
          No-op
 void updateKill(Ball context)
          No-op
 void updateState(Ball context)
          No-op
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ANoOpStrategy

public ANoOpStrategy()
Method Detail

updateState

public void updateState(Ball context)
No-op

Specified by:
updateState in interface IUpdateStrategy
Parameters:
context - The ball to update.

updateCollision

public void updateCollision(Ball context,
                            Ball target)
No-op

Specified by:
updateCollision in interface IUpdateStrategy
Parameters:
context - The ball that just moved and collided with the target ball.
target - The ball that was not moving and was collided by the context.

init

public void init(Ball context)
No-op

Specified by:
init in interface IUpdateStrategy
Parameters:
context - The ball to initialize.

updateKill

public void updateKill(Ball context)
No-op

Specified by:
updateKill in interface IUpdateStrategy
Parameters:
context - The ball who's kill method was called.