ballwar.model.strategy
Class KillStrategy

java.lang.Object
  extended by ballwar.model.strategy.ANoOpStrategy
      extended by ballwar.model.strategy.KillStrategy
All Implemented Interfaces:
IUpdateStrategy

public class KillStrategy
extends ANoOpStrategy

An ANoOpStrategy-based strategy that kills any ball that it collides with.


Field Summary
 
Fields inherited from interface ballwar.model.IUpdateStrategy
NullObject
 
Constructor Summary
KillStrategy()
           
 
Method Summary
 void updateCollision(Ball context, Ball target)
          Kills the target ball (calls its kill() method).
 
Methods inherited from class ballwar.model.strategy.ANoOpStrategy
init, kill, updateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KillStrategy

public KillStrategy()
Method Detail

updateCollision

public void updateCollision(Ball context,
                            Ball target)
Kills the target ball (calls its kill() method).

Specified by:
updateCollision in interface IUpdateStrategy
Overrides:
updateCollision in class ANoOpStrategy
Parameters:
context - The strategy's context.
target - The ball to kill.