ballwar.model.strategy
Class KillStrategy
java.lang.Object
ballwar.model.strategy.ANoOpStrategy
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KillStrategy
public KillStrategy()
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.