Class Summary |
ANoOpStrategy |
Abstract strategy that provides default behaviors that do nothing. |
AUpdateStrategy |
Abstract strategy that provides random initialization of a ball. |
BreathingStrategy |
An ANoOpStrategy-based strategy that only only overrides the updateState behavior
to make the ball's radius grower larger and smaller in a random sinusoidal manner. |
Change1Strategy |
A strategy that demonstrates self-modifying behavior by replacing itself with another strategy after a certain length of time. |
Change2Strategy |
Similar self-modifying behavior to Change1Strategy. |
ColorStrategy |
ANoOpStrategy-based strategy that randomly sets the context's color each time its updateState() method is called. |
CurveStrategy |
ANoOpStrategy-based strategy that continuously modifies the velocity to produce circular motion. |
DrunkenStrategy |
AUpdateStrategy-bsed strategy that delegates to one of 4 randomly choosen strategies whenever it's updateState is called. |
ExplodeStrategy |
An ANoOpStrategy-based strategy that, upon colliding with another ball, may replace its context
with a number of smaller balls with the same strategy, unless the context's radius is below
a minumum length, upon which the context is simply killed. |
HeavyStrategy |
An ANoOpStrategy-based strategy who initializes its context to have an infinitely large (positive) mass. |
KillStrategy |
An ANoOpStrategy-based strategy that kills any ball that it collides with. |
LightUpStrategy |
An ANoOpStrategy-based strategy that switches its color to a preset "lit up" color for a while after a collision. |
MoveStrategy |
An ANoOpStrategy-based strategy that modifies the velocity of the context ball through user key presses. |
MultiStrategy |
An ANoOpStrategy-based strategy that is the composition of two IUpdateStrategies. |
RockStrategy |
An ANoOpStrategy-based strategy that initializes its context's velocity to zero. |
ScoreStrategy |
An ANoOpStrategy-based strategy that increments an associated player's score at every collision
and resets that player's score if it is killed. |
StraightStrategy |
An AUpdateStrategy-based strategy whose updateState is a no-op hence the randomly initialized ball will travel in a straight line (unless it collides or bounces). |
SwitcherStrategy |
A Decorator design pattern strategy that decorates an IUpdateStrategy, enabling the
strategy (the decoree) to be switched at run-time. |
WanderStrategy |
An ANoOpStrategy-based strategy that randomly modifies the velocity whenever the state of the context is updated. |