|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use IUpdateStrategy | |
---|---|
ballwar.controller | |
ballwar.model | |
ballwar.model.strategy |
Uses of IUpdateStrategy in ballwar.controller |
---|
Methods in ballwar.controller that return IUpdateStrategy | |
---|---|
IUpdateStrategy |
BallControl.IStrategyFac.make()
Instantiate an IUpdateStrategy |
Uses of IUpdateStrategy in ballwar.model |
---|
Fields in ballwar.model declared as IUpdateStrategy | |
---|---|
private IUpdateStrategy |
Ball._strategy
The update strategy used by the ball |
static IUpdateStrategy |
IUpdateStrategy.NullObject
Singleton null object instance of IUpdateStrategy that does nothing. |
Methods in ballwar.model that return IUpdateStrategy | |
---|---|
IUpdateStrategy |
Ball.getStrategy()
Returns the current strategy of this Ball |
Methods in ballwar.model with parameters of type IUpdateStrategy | |
---|---|
Ball |
BallModel.loadBall(IUpdateStrategy strategy,
IPaintStrategy pstrategy)
|
void |
Ball.setStrategy(IUpdateStrategy strategy)
Sets the current update strategy of this Ball to the given strategy |
void |
BallModel.setSwitcherStrategy(IUpdateStrategy strategy)
Sets the strategy used by any switcher balls. |
Constructors in ballwar.model with parameters of type IUpdateStrategy | |
---|---|
Ball(IBallEnvironment env,
IUpdateStrategy strategy,
IPaintStrategy pstrategy)
Constructor for a ball. |
Uses of IUpdateStrategy in ballwar.model.strategy |
---|
Classes in ballwar.model.strategy that implement IUpdateStrategy | |
---|---|
class |
ANoOpStrategy
Abstract strategy that provides default behaviors that do nothing. |
class |
AUpdateStrategy
Abstract strategy that provides random initialization of a ball. |
class |
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. |
class |
Change1Strategy
A strategy that demonstrates self-modifying behavior by replacing itself with another strategy after a certain length of time. |
class |
Change2Strategy
Similar self-modifying behavior to Change1Strategy. |
class |
ColorStrategy
ANoOpStrategy-based strategy that randomly sets the context's color each time its updateState() method is called. |
class |
CurveStrategy
ANoOpStrategy-based strategy that continuously modifies the velocity to produce circular motion. |
class |
DrunkenStrategy
AUpdateStrategy-bsed strategy that delegates to one of 4 randomly choosen strategies whenever it's updateState is called. |
class |
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. |
class |
HeavyStrategy
An ANoOpStrategy-based strategy who initializes its context to have an infinitely large (positive) mass. |
class |
KillStrategy
An ANoOpStrategy-based strategy that kills any ball that it collides with. |
class |
LightUpStrategy
An ANoOpStrategy-based strategy that switches its color to a preset "lit up" color for a while after a collision. |
class |
MoveStrategy
An ANoOpStrategy-based strategy that modifies the velocity of the context ball through user key presses. |
class |
MultiStrategy
An ANoOpStrategy-based strategy that is the composition of two IUpdateStrategies. |
class |
RockStrategy
An ANoOpStrategy-based strategy that initializes its context's velocity to zero. |
class |
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. |
class |
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). |
class |
SwitcherStrategy
A Decorator design pattern strategy that decorates an IUpdateStrategy, enabling the strategy (the decoree) to be switched at run-time. |
class |
WanderStrategy
An ANoOpStrategy-based strategy that randomly modifies the velocity whenever the state of the context is updated. |
Fields in ballwar.model.strategy declared as IUpdateStrategy | |
---|---|
private IUpdateStrategy |
MultiStrategy._s1
First IUpdateStrategy composee |
private IUpdateStrategy |
MultiStrategy._s2
Second IUpdateStrategy composee |
private IUpdateStrategy |
SwitcherStrategy._strategy
|
private IUpdateStrategy |
DrunkenStrategy.s1
A possible strategy to use. |
private IUpdateStrategy |
DrunkenStrategy.s2
A possible strategy to use. |
private IUpdateStrategy |
DrunkenStrategy.s3
A possible strategy to use. |
private IUpdateStrategy |
DrunkenStrategy.s4
A possible strategy to use. |
Methods in ballwar.model.strategy with parameters of type IUpdateStrategy | |
---|---|
void |
SwitcherStrategy.setStrategy(IUpdateStrategy newStrategy)
Sets the decoree to reference the given strategy. |
Constructors in ballwar.model.strategy with parameters of type IUpdateStrategy | |
---|---|
MultiStrategy(IUpdateStrategy s1,
IUpdateStrategy s2)
Constructor for the class. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |