A B C D E F G H I K L M N O P R S U W _

A

addComponent(Component) - Method in class ballwar.view.BallGUI
Adds the given Component to the control panel.
addDisplayCmd(ILambda) - Method in class ballwar.model.BallModel
Adds a display command (ILambda) used to display messages onto the view.
addDisplayCmd(ILambda) - Method in interface ballwar.model.IBallEnvironment
Adds a command that will be run to whenever the view requests a display string to be displayed.
addItem(Object) - Method in class ballwar.view.OptionPanel
Adds the given item to the drop-list.
addKeyCmd(String, ILambda) - Method in class ballwar.model.BallModel
 
addKeyCmd(String, ILambda) - Method in interface ballwar.model.IBallEnvironment
Associates a key with a behavior (command).
addKeyCmd(String, ILambda) - Method in interface ballwar.model.IViewCtrlAdapter
Asks the GUI to associate the given key with the given behavior.
addKeyCmd(String, ILambda) - Method in class ballwar.view.BallGUI
Adds the given key such that whenever that key is pressed the given command (AbstractAction) is performed.
addPaintStrategy(String) - Method in interface ballwar.view.IBallCreateAdapter
Add a paint strategy to the the model.
addStrategy(String) - Method in interface ballwar.view.IBallCreateAdapter
Add a strategy to the the model.
ADecoratorPaintStrategy - Class in ballwar.model.paint
Abstract class that provides default behavior for subclasses that will decorate another IPaintStrategy to add functionality to that strategy.
ADecoratorPaintStrategy(IPaintStrategy) - Constructor for class ballwar.model.paint.ADecoratorPaintStrategy
Constructor that takes the decoree paint strategy
angle - Variable in class ballwar.model.strategy.CurveStrategy
The incremental amount to rotate the context's velocity by each time its updateState is called (in radians).
AnimatePaintStrategy - Class in ballwar.model.paint
Concrete paint strategy that cycles through a sequence of paint strategies, painting one per paint update.
AnimatePaintStrategy(IPaintStrategy...) - Constructor for class ballwar.model.paint.AnimatePaintStrategy
Constructor that instantiates an AffineTransform for internal use.
AnimatePaintStrategy(AffineTransform, IPaintStrategy...) - Constructor for class ballwar.model.paint.AnimatePaintStrategy
Constructor that uses the supplied AffineTransform for internal use.
ANoOpStrategy - Class in ballwar.model.strategy
Abstract strategy that provides default behaviors that do nothing.
ANoOpStrategy() - Constructor for class ballwar.model.strategy.ANoOpStrategy
 
APaintStrategy - Class in ballwar.model.paint
An abstract paint strategy that provides default behavior for its subclasses.
APaintStrategy(AffineTransform) - Constructor for class ballwar.model.paint.APaintStrategy
Constructor that initializes the strategy with an affine transform
apply(Ball) - Method in interface ballwar.model.IBallCmd
The method run by the ball's update method which is called when the ball is updated by the dispatcher.
apply(Object) - Method in interface util.ILambda
Performs some computation with a given input Object.
ARROWSEND - Static variable in interface ballwar.model.IMovementKeys
A predefined set of movement keys where the arrow keys ("UP", "DOWN", "LEFT" and "RIGHT") are associated with their respective directions and the "END" key is associated with stopping.
at - Variable in class ballwar.model.paint.APaintStrategy
The affine transform used by this paint strategy to translate, scale and rotate the image.
at - Variable in class ballwar.model.paint.BallPaintStrategy
The AffineTransformed used for internal calculations.
at - Variable in class ballwar.model.paint.PolygonFactory
The AffineTransform used for internal calculations
at - Variable in class ballwar.model.paint.SquarePaintStrategy
The AffineTransformed used for internal calculations.
AUpdateStrategy - Class in ballwar.model.strategy
Abstract strategy that provides random initialization of a ball.
AUpdateStrategy() - Constructor for class ballwar.model.strategy.AUpdateStrategy
 
autoWidth() - Method in class ballwar.view.BallGUI
Automaticaly adjusts the width of the GUI to its minumum size such that all the controls can be seen.

B

Ball - Class in ballwar.model
An concrete circular ball that moves in a line with its given velocity and bounces off the walls of a rectangularly shaped container.
Ball(IBallEnvironment, IUpdateStrategy, IPaintStrategy) - Constructor for class ballwar.model.Ball
Constructor for a ball.
ball - Variable in class ballwar.model.paint.BallPaintStrategy
Unit sized circle used as a prototype
BallControl - Class in ballwar.controller
The "Controller" in a Model-View-Controller architecture Sets up the appropriate wiring between the model and the view.
BallControl() - Constructor for class ballwar.controller.BallControl
Constructor for the BallControl class Used when run as an applet.
BallControl(WindowListener) - Constructor for class ballwar.controller.BallControl
Constructor for the BallControl class Used when run as an application.
BallControl.IPaintFac - Interface in ballwar.controller
An abstract factory used for manufacturing paint strategies.
BallControl.IStrategyFac - Interface in ballwar.controller
An abstract factory used for manufacturing strategies.
BallGUI - Class in ballwar.view
A subclass of JFrame containing the various GUI components specified in the program behavior specification.
BallGUI(WindowListener, IBallCreateAdapter, IBallCtrlAdapter, IGameCtrlAdapter) - Constructor for class ballwar.view.BallGUI
Constructor for the class.
BallModel - Class in ballwar.model
Represents the main "model" of the system that coordinates the non-GUI processing.
BallModel(IViewCtrlAdapter) - Constructor for class ballwar.model.BallModel
Constructor for the BallControl class Instantiates the BallGUI frame with the required ILambdas for making a ball, clearing the balls from the screen and for painting the balls onto the Container Starts the timer up.
BallPaintStrategy - Class in ballwar.model.paint
Paint strategy that paints a filled circle with the Ball's radius.
BallPaintStrategy() - Constructor for class ballwar.model.paint.BallPaintStrategy
No parameter constructor that creates a 1 pixel radius ball at the origin.
BallPaintStrategy(AffineTransform, double, double, double, double) - Constructor for class ballwar.model.paint.BallPaintStrategy
Constructor that allows one to create the prototype ball of arbitrary dimension and location.
ballwar.controller - package ballwar.controller
 
ballwar.model - package ballwar.model
 
ballwar.model.paint - package ballwar.model.paint
 
ballwar.model.strategy - package ballwar.model.strategy
 
ballwar.view - package ballwar.view
 
BirdSheepImagePaintStrategy - Class in ballwar.model.paint
An example of an ImagePaintStrategy that randomly picks one of two animated image files to display when it is instantiated.
BirdSheepImagePaintStrategy() - Constructor for class ballwar.model.paint.BirdSheepImagePaintStrategy
No-parameter constructor that instantiates the AffineTransform used internally and randomly loads one of two files: ballwar\model\paint\images\humbird4.gif or ballwar\model\paint\images\img104c.gif with a fill factor of 0.5.
bounce() - Method in class ballwar.model.Ball
Checks if the ball needs to bounce off the wall of its container.
BreathingStrategy - Class in ballwar.model.strategy
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.
BreathingStrategy() - Constructor for class ballwar.model.strategy.BreathingStrategy
 

C

cBox - Variable in class ballwar.view.OptionPanel
The drop-list holds all the items.
Change1Strategy - Class in ballwar.model.strategy
A strategy that demonstrates self-modifying behavior by replacing itself with another strategy after a certain length of time.
Change1Strategy() - Constructor for class ballwar.model.strategy.Change1Strategy
 
Change2Strategy - Class in ballwar.model.strategy
Similar self-modifying behavior to Change1Strategy.
Change2Strategy() - Constructor for class ballwar.model.strategy.Change2Strategy
 
checkCollide(Ball) - Method in class ballwar.model.Ball
Checks if this ball has collided with the given target ball.
clearBalls() - Method in class ballwar.model.BallModel
Clears all the balls from the dispatcher and resets the display string to its original state.
clearBalls() - Method in interface ballwar.view.IBallCtrlAdapter
Asks the model to clear (delete) all the balls.
clearItems() - Method in class ballwar.view.OptionPanel
Remove all the items from the list.
collidedWith(Ball, double, double) - Method in class ballwar.model.Ball
Called when this ball has moved and collided with the target ball.
collidedWithHelp(Ball, double, double) - Method in class ballwar.model.Ball
Called when another ball has moved an collided with this target ball.
color - Variable in class ballwar.model.paint.FixedColorDecoratorPaintStrategy
The color that will be painted.
ColorStrategy - Class in ballwar.model.strategy
ANoOpStrategy-based strategy that randomly sets the context's color each time its updateState() method is called.
ColorStrategy() - Constructor for class ballwar.model.strategy.ColorStrategy
 
combineStrategies(Object, Object) - Method in interface ballwar.view.IBallCreateAdapter
Add a combination of two strategies to the model.
cosA - Variable in class ballwar.model.strategy.CurveStrategy
Precalculated value of cos(angle)
count - Variable in class ballwar.model.paint.AnimatePaintStrategy
The counter that keeps track of which paint strategy to use next.
CurveStrategy - Class in ballwar.model.strategy
ANoOpStrategy-based strategy that continuously modifies the velocity to produce circular motion.
CurveStrategy() - Constructor for class ballwar.model.strategy.CurveStrategy
 

D

decoree - Variable in class ballwar.model.paint.ADecoratorPaintStrategy
The "decoree" paint strategy whose methods are being augmented by this decorator paint strategy.
Dispatcher - Class in util
A simplified Observable class that immediately notifies its Observers when its notifyAll() method is called.
Dispatcher() - Constructor for class util.Dispatcher
 
doKill() - Method in class ballwar.model.Ball
Kills th ball by removing it from the dispatcher.
DrunkenStrategy - Class in ballwar.model.strategy
AUpdateStrategy-bsed strategy that delegates to one of 4 randomly choosen strategies whenever it's updateState is called.
DrunkenStrategy() - Constructor for class ballwar.model.strategy.DrunkenStrategy
 

E

EllipsePaintStrategy - Class in ballwar.model.paint
Paint strategy to paint an ellipse shape
EllipsePaintStrategy() - Constructor for class ballwar.model.paint.EllipsePaintStrategy
No parameter constructor that creates a prototype ellipse that has twice the width as height but an average radius of 1.
EllipsePaintStrategy(AffineTransform, double, double, double, double) - Constructor for class ballwar.model.paint.EllipsePaintStrategy
Constructor that allows the specification of the location, x-radius and y-radius of the prototype ellipse.
EllipseShapeFactory - Class in ballwar.model.paint
Concrete shape factory that instantiates Ellipse2D.Double shapes.
EllipseShapeFactory() - Constructor for class ballwar.model.paint.EllipseShapeFactory
 
end() - Method in interface ballwar.view.IGameCtrlAdapter
Asks that the model end the game.
ExplodeStrategy - Class in ballwar.model.strategy
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.
ExplodeStrategy() - Constructor for class ballwar.model.strategy.ExplodeStrategy
 

F

Fish1PaintStrategy - Class in ballwar.model.paint
Paint strategy that paints a fish-shaped Polygon generated by a Fish1PolyfonFactory.
Fish1PaintStrategy() - Constructor for class ballwar.model.paint.Fish1PaintStrategy
No-parameter constructor that instantiates the AffineTransform for internal use.
Fish1PaintStrategy(AffineTransform) - Constructor for class ballwar.model.paint.Fish1PaintStrategy
Constructor that takes an external AffineTransform
Fish1PolygonFactory - Class in ballwar.model.paint
Concrete PolygonFactory that creates fish-shaped Polygons that have a longer tail and an open mouth.
Fish1PolygonFactory() - Constructor for class ballwar.model.paint.Fish1PolygonFactory
Constructor that calls the PolygonFactory superclass constructor with the scale factor and polygon points that define the fish shape.
Fish2PaintStrategy - Class in ballwar.model.paint
Paint strategy that paints a fish-shaped Polygon generated by a Fish2PolyfonFactory.
Fish2PaintStrategy() - Constructor for class ballwar.model.paint.Fish2PaintStrategy
No-parameter constructor that instantiates the AffineTransform for internal use.
Fish2PaintStrategy(AffineTransform) - Constructor for class ballwar.model.paint.Fish2PaintStrategy
Constructor that takes an external AffineTransform
Fish2PolygonFactory - Class in ballwar.model.paint
Concrete PolygonFactory that creates fish-shaped Polygons that have a shorter tail and a closed mouth.
Fish2PolygonFactory() - Constructor for class ballwar.model.paint.Fish2PolygonFactory
Constructor that calls the PolygonFactory superclass constructor with the scale factor and polygon points that define the fish shape.
FixedColorDecoratorPaintStrategy - Class in ballwar.model.paint
Decorator paint strategy that decorates another IPaintStrategy and causes the painted color to always be a specified, fixed color.
FixedColorDecoratorPaintStrategy(Color, IPaintStrategy) - Constructor for class ballwar.model.paint.FixedColorDecoratorPaintStrategy
Constructor that
fixName(String, Object, String) - Method in class ballwar.controller.BallControl
Convenience method to add the rest of a strategy's classname plus the word "Strategy" at the end of the classname.

G

getCanvasHeight() - Method in interface ballwar.model.IViewCtrlAdapter
Gets the height of the GUI component upon which the balls are painted.
getCanvasWidth() - Method in interface ballwar.model.IViewCtrlAdapter
Gets the width of the GUI component upon which the balls are painted.
getColor() - Method in class ballwar.model.Ball
Returns the current color of this Ball.
getComponent() - Method in class ballwar.model.BallModel
 
getComponent() - Method in interface ballwar.model.IBallEnvironment
Gets the Component that the Balls will be painted on.
getComponent() - Method in interface ballwar.model.IViewCtrlAdapter
 
getContainer() - Method in class ballwar.view.BallGUI
Accessor method for the panel upon which the balls are to be drawn
getDblVal() - Method in class util.SineMaker
Returns a different value each time it is called.
getDispatcher() - Method in class ballwar.model.BallModel
Get the dispatcher used to notify all the balls to execute a supplied command.
getDispatcher() - Method in interface ballwar.model.IBallEnvironment
Get the ball dispatcher used by the system.
getDisplayStr(String) - Method in class ballwar.model.BallModel
Called by the view to get the current display string.
getDisplayStr(String) - Method in interface ballwar.view.IBallCtrlAdapter
Asks that the models augment or replace the current given display string.
getDownKey() - Method in interface ballwar.model.IMovementKeys
Get the name of the key that controls downward movement.
getEnv() - Method in class ballwar.model.Ball
Get the ball's environment
getHeight() - Method in class ballwar.model.BallModel
Gets the height of the ball's environment
getHeight() - Method in interface ballwar.model.IBallEnvironment
Get the height of the ball's environment.
getIntVal() - Method in class util.SineMaker
Same as getDblVal, but returns the result rounded to the nearest integer.
getLeftKey() - Method in interface ballwar.model.IMovementKeys
Get the name of the key that controls leftward movement.
getLocation() - Method in class ballwar.model.Ball
Returns the current center of this Ball.
getLocation() - Method in interface ballwar.model.IMoveable
The current location of the moveable object.
getMass() - Method in class ballwar.model.Ball
Get the ball's mass
getMovementKeys() - Method in interface ballwar.model.IPlayer
Get the set of movement keys associated with this player.
getName() - Method in interface ballwar.model.IPlayer
Get the player's name.
getPaintStrategy() - Method in class ballwar.model.Ball
Returns the current paint strategy of this Ball
getRadius() - Method in class ballwar.model.Ball
Returns the current radius for this Ball.
getRightKey() - Method in interface ballwar.model.IMovementKeys
Get the name of the key that controls right ward movement.
getScore() - Method in interface ballwar.model.IPlayer
Get the player's score
getSelectedItem() - Method in class ballwar.view.OptionPanel
Returns the selected item from the drop list without removing it from the list.
getSelectedPlayer() - Method in class ballwar.model.BallModel
Get the currently selected player from the view.
getSelectedPlayer() - Method in interface ballwar.model.IBallEnvironment
Get the currently selected player.
getSelectedPlayer() - Method in interface ballwar.model.IViewCtrlAdapter
Returns the currently selected player on the GUI.
getSelectedPlayer() - Method in class ballwar.view.BallGUI
Returns the selected player (held in a drop list) .
getStopKey() - Method in interface ballwar.model.IMovementKeys
Get the name of the key that stops the movement.
getStrategy() - Method in class ballwar.model.Ball
Returns the current strategy of this Ball
getUpKey() - Method in interface ballwar.model.IMovementKeys
Get the name of the key that controls upward movement.
getVelocity() - Method in class ballwar.model.Ball
Returns the current velocity of this Ball.
getWidth() - Method in class ballwar.model.BallModel
Get's the width of the ball's environment.
getWidth() - Method in interface ballwar.model.IBallEnvironment
Get the width of the ball's environment.

H

HeavyStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy who initializes its context to have an infinitely large (positive) mass.
HeavyStrategy() - Constructor for class ballwar.model.strategy.HeavyStrategy
 

I

i - Variable in class ballwar.model.strategy.Change1Strategy
The counter that deternines the number of updates before this strategy replaces itself in its context.
i - Variable in class ballwar.model.strategy.Change2Strategy
Counter that determines the number of updates before this strategy replaces itself.
IBallCmd - Interface in ballwar.model
Interface that represents commands sent through the dispatcher to process the balls
IBallCreateAdapter - Interface in ballwar.view
Interface that represents the ball creattion capabilities of the model offered to the view.
IBallCtrlAdapter - Interface in ballwar.view
Interface to the model from the view that is used to control the balls once they are already created.
IBallEnvironment - Interface in ballwar.model
An interface that represents the environment in which the ball is operating.
IGameCtrlAdapter - Interface in ballwar.view
Interface to the model that the view uses to control the game itself.
ILambda - Interface in util
Represents the abstract lambda expression whose sole purpose in life is to evaluate itself on an input and return the result of the evaluation.
image - Variable in class ballwar.model.paint.ImagePaintStrategy
The image to paint
imageObs - Variable in class ballwar.model.paint.ImagePaintStrategy
ImageObserver needed for some image operations
ImagePaintStrategy - Class in ballwar.model.paint
Paint strategy that paints an image from a file, scaled to the host Ball's radius.
ImagePaintStrategy(String, double) - Constructor for class ballwar.model.paint.ImagePaintStrategy
Constructor that takes the image filename and fill factor.
ImagePaintStrategy(AffineTransform, String, double) - Constructor for class ballwar.model.paint.ImagePaintStrategy
Constructor that takes an external AffineTransform, the filename of the image to paint and a fill factor of the image.
IMoveable - Interface in ballwar.model
Interface that represents a "moveable" object.
IMovementKeys - Interface in ballwar.model
Interface that represents a set of movement keys.
init() - Method in class ballwar.controller.BallControl
Initializes the system by instantiating the view and the model and all the necessary adapters.
init(Ball) - Method in interface ballwar.model.IPaintStrategy
Initializes the given ball.
init(Ball) - Method in interface ballwar.model.IUpdateStrategy
Initializes the given ball.
init(Ball) - Method in class ballwar.model.paint.ADecoratorPaintStrategy
Default behavior is to simply delegate to the decoree's init method
init(Ball) - Method in class ballwar.model.paint.APaintStrategy
By default, do nothing for initialization.
init(Ball) - Method in class ballwar.model.paint.BallPaintStrategy
By default, do nothing for initialization.
init(Ball) - Method in class ballwar.model.paint.ImagePaintStrategy
Initializes the internal ImageObserver reference from the host Ball
init(Ball) - Method in class ballwar.model.paint.MultiPaintStrategy
Delegates to all the IPaintStrategies in the composite.
init(Ball) - Method in class ballwar.model.paint.SquarePaintStrategy
By default, do nothing for initialization.
init(Ball) - Method in class ballwar.model.strategy.ANoOpStrategy
No-op
init(Ball) - Method in class ballwar.model.strategy.AUpdateStrategy
Initializes the ball with a random radius, velocity, location (within the bounds of the ball's environment) and color.
init(Ball) - Method in class ballwar.model.strategy.HeavyStrategy
Initializes the context's mass to positive infinity.
init(Ball) - Method in class ballwar.model.strategy.LightUpStrategy
Saves the context's current color.
init(Ball) - Method in class ballwar.model.strategy.MoveStrategy
Initializes the context such that the movement keys of the currently selected player are registered with the environment.
init(Ball) - Method in class ballwar.model.strategy.MultiStrategy
Initializes the context with the first then the second composee.
init(Ball) - Method in class ballwar.model.strategy.RockStrategy
Sets the context's velocity to zero.
init(Ball) - Method in class ballwar.model.strategy.ScoreStrategy
Associates this strategy with the currently selected player
init(Ball) - Method in class ballwar.model.strategy.SwitcherStrategy
Initializes the context using the decoree strategy.
init() - Method in class ballwar.view.BallGUI
Initializes and lays out the GUI components.
IPaintStrategy - Interface in ballwar.model
Interface that represents a strategy used by a Ball when asked to perform variant paint operations.
IPlayer - Interface in ballwar.model
Interface that represents a single player that has a name and a score and is associated wtih a particular set of movement keys.
IRandomizer - Interface in util
A utility class used to generate different types of random values.
IShapeFactory - Interface in ballwar.model.paint
Abstract factory that creates a Shape for use as prototype shapes in IPaintStrategies.
IUpdateStrategy - Interface in ballwar.model
Interface that represents a strategy used by a Ball when asked to perform variant operations associated with initialization, updating its state, collisions and destruction.
IViewCtrlAdapter - Interface in ballwar.model
The adapter interface the model uses to communicate to the view.

K

kill() - Method in class ballwar.model.Ball
"Kills" this ball by delegating the request to the strategy.
kill(Ball) - Method in interface ballwar.model.IUpdateStrategy
Processes a "killing" of a ball.
kill(Ball) - Method in class ballwar.model.strategy.ANoOpStrategy
No-op
kill(Ball) - Method in class ballwar.model.strategy.AUpdateStrategy
Calls the context's doKill() method to remove it from the system.
kill(Ball) - Method in class ballwar.model.strategy.MultiStrategy
Delegates the kill request to the first then the second composee.
kill(Ball) - Method in class ballwar.model.strategy.ScoreStrategy
Sets the player's score to zero.
kill(Ball) - Method in class ballwar.model.strategy.SwitcherStrategy
Process the context's kill request using the decoree.
KillStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy that kills any ball that it collides with.
KillStrategy() - Constructor for class ballwar.model.strategy.KillStrategy
 

L

LightUpStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy that switches its color to a preset "lit up" color for a while after a collision.
LightUpStrategy() - Constructor for class ballwar.model.strategy.LightUpStrategy
 
loadBall(IUpdateStrategy, IPaintStrategy) - Method in class ballwar.model.BallModel
 
loadStrategy(String, Object) - Method in class ballwar.model.BallModel
Uses dynamic class loading to load and instantiate a specified class, given its full class name.
loadSwitcherBall(IPaintStrategy) - Method in class ballwar.model.BallModel
Loads a ball with a switcher strategy into the system.

M

main(String[]) - Static method in class ballwar.controller.BallControl
Entry point to the program.
make() - Method in interface ballwar.controller.BallControl.IPaintFac
Instantiate an IPaintStrategy
make() - Method in interface ballwar.controller.BallControl.IStrategyFac
Instantiate an IUpdateStrategy
makeBall(Object, Object) - Method in interface ballwar.view.IBallCreateAdapter
Makes a ball in the model using the given factory, whose type and usage is unavailable to the view.
makePlayer(String, IMovementKeys) - Method in class ballwar.model.BallModel
Makes a play8er object given a name and a set of movement keys.
makePlayer(String) - Method in interface ballwar.view.IGameCtrlAdapter
Asks the model to create a player with the given name.
makeShape(double, double, double, double) - Method in class ballwar.model.paint.EllipseShapeFactory
Instantiates an ellipse
makeShape(double, double, double, double) - Method in interface ballwar.model.paint.IShapeFactory
Returns a Shape object centered at (x, y) and with the specified x and y dimensions.
makeShape(double, double, double, double) - Method in class ballwar.model.paint.PolygonFactory
Instantiates a Shape object that is the prototype Polygon translated by the given (x, y) point and scaled by given (xScale, yScale) factor times the internal scaleFactor.
makeShape(double, double, double, double) - Method in class ballwar.model.paint.RectangleShapeFactory
Instantiates a Rectangle2D.Double object at the specified orign and size.
makeSwitcher(Object) - Method in interface ballwar.view.IBallCreateAdapter
Tells the model to add a ball using the currently defined SwitcherStrategy.
moveDown() - Method in interface ballwar.model.IMoveable
Tells the moveable object to move to the down by an amount or at a rate determined by the object.
moveLeft() - Method in interface ballwar.model.IMoveable
Tells the moveable object to move to the left by an amount or at a rate determined by the object.
moveRight() - Method in interface ballwar.model.IMoveable
Tells the moveable object to move to the right by an amount or at a rate determined by the object.
MoveStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy that modifies the velocity of the context ball through user key presses.
MoveStrategy() - Constructor for class ballwar.model.strategy.MoveStrategy
 
moveUp() - Method in interface ballwar.model.IMoveable
Tells the moveable object to move to the up by an amount or at a rate determined by the object.
MultiPaintStrategy - Class in ballwar.model.paint
A composite design pattern exension of APaintStrategy that paints a set of paint strategies.
MultiPaintStrategy(IPaintStrategy...) - Constructor for class ballwar.model.paint.MultiPaintStrategy
Constructor that takes the paint strategies that will part of the composite.
MultiPaintStrategy(AffineTransform, IPaintStrategy...) - Constructor for class ballwar.model.paint.MultiPaintStrategy
Constructor that takes the paint strategies that will part of the composite.
MultiStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy that is the composition of two IUpdateStrategies.
MultiStrategy(IUpdateStrategy, IUpdateStrategy) - Constructor for class ballwar.model.strategy.MultiStrategy
Constructor for the class.

N

NiceFishPaintStrategy - Class in ballwar.model.paint
Subclass of MultiPaintStrategy that uses a SwimFishPaintStrategy and an EllipsePaintStrategy to paint a swimming fish shape that has an eye.
NiceFishPaintStrategy() - Constructor for class ballwar.model.paint.NiceFishPaintStrategy
No-parameter constructor that instantiates the AffineTransform for internal use.
NiceFishPaintStrategy(AffineTransform) - Constructor for class ballwar.model.paint.NiceFishPaintStrategy
Constructor that uses an externally supplied AFfineTransform for internal use.
notifyAll(Object) - Method in class util.Dispatcher
Immediately notifies all the Observers held.
NullEnv - Static variable in interface ballwar.model.IBallEnvironment
Represents a null environment that does nothing.
NullObject - Static variable in interface ballwar.model.IPaintStrategy
The singleton null object instance for this interface, which does nothing.
NullObject - Static variable in interface ballwar.model.IUpdateStrategy
Singleton null object instance of IUpdateStrategy that does nothing.
NullObject - Static variable in interface util.ILambda
Singleton null object instance of ILambda.
NullPlayer - Static variable in interface ballwar.model.IPlayer
Null object IPlayer singleton instance that does nothing.

O

OptionPanel - Class in ballwar.view
A generic JComponent for the GUI used to select from a drop-list of possible options.
OptionPanel(String, Object[]) - Constructor for class ballwar.view.OptionPanel
The constructor for the class.

P

paint(Graphics) - Method in class ballwar.model.Ball
Paints the image of the ball onto a Graphics object using the current paint strategy.
paint(Graphics) - Method in class ballwar.model.BallModel
Tells the model to have all the balls to update their states and paint themselves onto the supplied Graphics object.
paint(Graphics, Ball) - Method in interface ballwar.model.IPaintStrategy
Paints the host onto the given Graphics context.
paint(Graphics, Ball) - Method in class ballwar.model.paint.ADecoratorPaintStrategy
Default behavior is to simply delegate to the decoree's paint method
paint(Graphics, Ball) - Method in class ballwar.model.paint.APaintStrategy
Paints on the given graphics context using the color, scale and direction provided by the host.
paint(Graphics, Ball) - Method in class ballwar.model.paint.BallPaintStrategy
Paints on the given graphics context using the color, scale and direction provided by the host.
paint(Graphics, Ball) - Method in class ballwar.model.paint.SquarePaintStrategy
Paints on the given graphics context using the color, scale and direction provided by the host.
paint(Graphics) - Method in interface ballwar.view.IBallCtrlAdapter
Requests that the model have all the balls paint themselves onto the given Graphics context and to update ther states.
paintCfg(Graphics, Ball) - Method in class ballwar.model.paint.APaintStrategy
Used for doing additional configurations.
paintCfg(Graphics, Ball) - Method in class ballwar.model.paint.BirdSheepImagePaintStrategy
Augments the inhereited paint method to add flipping of the image to keep it upright.
paintCfg(Graphics, Ball) - Method in class ballwar.model.paint.ImagePaintStrategy
Augments the inhereited paint method to add the scaling of the image by the scaleFactor and translation to the center of the image.
paintCfg(Graphics, Ball) - Method in class ballwar.model.paint.NiceFishPaintStrategy
Override paintCfg to add the transform needed to keep the fish upright at all times.
paintStrats - Variable in class ballwar.model.paint.AnimatePaintStrategy
The paint strategies to cycle through
paintXfrm(Graphics, Ball, AffineTransform) - Method in interface ballwar.model.IPaintStrategy
Paints the host onto the given Graphics context.
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.ADecoratorPaintStrategy
Default behavior is to simply delegate to the decoree's paintXfrm method
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.AnimatePaintStrategy
Paints the currently indexed paint strategy on the given Graphics context using the supplied AffineTransform.
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.BallPaintStrategy
Paints a transformed circle, as per the given AffineTransform Uses color already set in Graphics context
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.FixedColorDecoratorPaintStrategy
 
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.ImagePaintStrategy
Draws the image on the given Graphics context using the given affine transform.
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.MultiPaintStrategy
Delegates to all the IPaintStrategies in the composite.
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.ShapePaintStrategy
Paints the shape on the given Graphics context using the supplied AffineTransform.
paintXfrm(Graphics, Ball, AffineTransform) - Method in class ballwar.model.paint.SquarePaintStrategy
Paints a transformed square, as per the given AffineTransform Uses color already set in Graphics context
pause() - Method in interface ballwar.view.IGameCtrlAdapter
Asks that the model pause the game.
poly - Variable in class ballwar.model.paint.PolygonFactory
The Polygon shape to use as the prototype.
PolygonFactory - Class in ballwar.model.paint
Concrete IShapeFactory that provides the invariant behavior to instantiate a Shape that is a Polygon.
PolygonFactory(AffineTransform, double, Point...) - Constructor for class ballwar.model.paint.PolygonFactory
Constructor that uses an externally defined AffineTransform for internal use plus takes the defining points of the prototype Polygon and a scale factor to scale the given points to the desired unit size.
pstrats - Variable in class ballwar.model.paint.MultiPaintStrategy
The set of paint strategies to paint

R

rand - Variable in class ballwar.model.strategy.BreathingStrategy
The Randomizer used to create the random values.
rand - Variable in class ballwar.model.strategy.Change2Strategy
Randomizer to generate random colors
rand - Variable in class ballwar.model.strategy.ColorStrategy
Randominzer used to generate the random colors needed.
rand - Variable in class ballwar.model.strategy.CurveStrategy
Randomizer used to randomly generate the increment angle.
rand - Variable in class ballwar.model.strategy.DrunkenStrategy
Randomizer used to generate the random values.
randomBounds(Rectangle, Dimension) - Method in interface util.IRandomizer
Generates a randomly located and sized rectangle
randomBounds(Rectangle, Dimension) - Method in class util.Randomizer
Generates a randomly located and sized rectangle
randomChoice(Object, Object, double) - Method in interface util.IRandomizer
Returns a random choice of one of two objects, x and y, where probX is the probability that x will be picked (0<=x<=1).
randomChoice(Object, Object, double) - Method in class util.Randomizer
Returns a random choice of one of two objects, x and y, where probX is the probability that x will be picked (0<=x<=1).
randomColor() - Method in interface util.IRandomizer
Generates a random color
randomColor() - Method in class util.Randomizer
Generates a random color
randomDim(Dimension) - Method in interface util.IRandomizer
Returns a random square Dimension, whose width is maxDim.width/2<=width<=maxDim.width
randomDim(Dimension) - Method in class util.Randomizer
Returns a random square Dimension, whose width is maxDim.width/2<=width<=maxDim.width
randomDouble(double, double) - Method in interface util.IRandomizer
Returns a random double greater than or equal to min and less than or equal to max.
randomDouble(double, double) - Method in class util.Randomizer
Returns a random double greater than or equal to min and less than or equal to max.
randomInt(int, int) - Method in interface util.IRandomizer
Returns a random integer greater than or equal to min and less than or equal to max.
randomInt(int, int) - Method in class util.Randomizer
Returns a random integer greater than or equal to min and less than or equal to max.
Randomizer - Class in util
Utility class that supplies class routines for generating various random values
Randomizer() - Constructor for class util.Randomizer
 
randomLoc(Rectangle) - Method in interface util.IRandomizer
Generates a random location point subject to the constraint that 0<=X<=maxX and 0<=Y<=maxY.
randomLoc(Dimension) - Method in interface util.IRandomizer
Generates a random location point subject to the constraint that 0<=X<=maxX and 0<=Y<=maxY.
randomLoc(Rectangle) - Method in class util.Randomizer
Generates a random location point subject to the constraint that 0<=X<=maxX and 0<=Y<=maxY.
randomLoc(Dimension) - Method in class util.Randomizer
Generates a random location point subject to the constraint that 0<=X<=maxX and 0<=Y<=maxY.
randomVel(Rectangle) - Method in interface util.IRandomizer
Returns a random velocity (as a Point) subject to the constraint that the absolute value of the vleocity (speed) is less than maxV.
randomVel(Rectangle) - Method in class util.Randomizer
Returns a random velocity (as a Point) subject to the constraint that the absolute value of the vleocity (speed) is less than maxV.
rect - Variable in class ballwar.model.paint.SquarePaintStrategy
Unit sized rectangle used as a prototype
RectanglePaintStrategy - Class in ballwar.model.paint
Concrete paint strategy that paints a rectangular shape scaled to the size of the ball.
RectanglePaintStrategy() - Constructor for class ballwar.model.paint.RectanglePaintStrategy
No-parameter constructor that instantiates the AffineTransform for internal use plus defines a prototype Rectangle of a width = 8/3 and height = 2/3 which is an average radius of 1.
RectanglePaintStrategy(AffineTransform, double, double, double, double) - Constructor for class ballwar.model.paint.RectanglePaintStrategy
Constructor that takes an external AffineTransform for internal use and a Rectangle centered at (x, y) with the given half-width and half-height (= x-radius and y-radius).
RectangleShapeFactory - Class in ballwar.model.paint
Concrete IShapeFactory that instantiates Rectangle2d.Double shapes.
RectangleShapeFactory() - Constructor for class ballwar.model.paint.RectangleShapeFactory
 
registerMovementKeys(IMovementKeys, IMoveable) - Method in class ballwar.model.BallModel
Registers a set of movement keys, as defined by an IMovementKeys object, with the view.
registerMovementKeys(IMovementKeys, IMoveable) - Method in interface ballwar.model.IBallEnvironment
Takes an IMovementKeys object which defines a set of movement keys and associates the pressing of each key with its respective behavior in the given IMoveable object.
removeSelectedItem() - Method in class ballwar.view.OptionPanel
Returns the selected item from the list and removes it from the list.
RockStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy that initializes its context's velocity to zero.
RockStrategy() - Constructor for class ballwar.model.strategy.RockStrategy
 

S

s1 - Variable in class ballwar.model.strategy.DrunkenStrategy
A possible strategy to use.
s2 - Variable in class ballwar.model.strategy.DrunkenStrategy
A possible strategy to use.
s3 - Variable in class ballwar.model.strategy.DrunkenStrategy
A possible strategy to use.
s4 - Variable in class ballwar.model.strategy.DrunkenStrategy
A possible strategy to use.
scaleFactor - Variable in class ballwar.model.paint.ImagePaintStrategy
Number of times larger than unit size of image
scaleFactor - Variable in class ballwar.model.paint.PolygonFactory
Scale factor that scales the integer Point-defined Polygon to a unit size, which requires doubles.
ScoreStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy that increments an associated player's score at every collision and resets that player's score if it is killed.
ScoreStrategy() - Constructor for class ballwar.model.strategy.ScoreStrategy
 
setColor(Color) - Method in class ballwar.model.Ball
Sets the color of this Ball to a given color.
setLocation(Point) - Method in class ballwar.model.Ball
Sets the center of the ball to a new location.
setMass(double) - Method in class ballwar.model.Ball
Sets the ball's mass
setMovementKeys(IMovementKeys) - Method in interface ballwar.model.IPlayer
Set the set of movement keys to be associated with this player.
setPaintStrategy(IPaintStrategy) - Method in class ballwar.model.Ball
Sets the current strategy of this Ball to the given strategy
setRadius(int) - Method in class ballwar.model.Ball
Sets the radius of this Ball to a new radius.
setScore(int) - Method in interface ballwar.model.IPlayer
Sets the player's score (integer value).
setStrategy(IUpdateStrategy) - Method in class ballwar.model.Ball
Sets the current update strategy of this Ball to the given strategy
setStrategy(IUpdateStrategy) - Method in class ballwar.model.strategy.SwitcherStrategy
Sets the decoree to reference the given strategy.
setSwitcherStrategy(IUpdateStrategy) - Method in class ballwar.model.BallModel
Sets the strategy used by any switcher balls.
setVelocity(Point) - Method in class ballwar.model.Ball
Sets the velocity of this Ball to a new velocity.
shape - Variable in class ballwar.model.paint.ShapePaintStrategy
The Shape to be painted
ShapePaintStrategy - Class in ballwar.model.paint
Concrete class that defines invariant painting behaviors for all Shape subclasses.
ShapePaintStrategy(Shape) - Constructor for class ballwar.model.paint.ShapePaintStrategy
Constructor that allocates a new AffineTransform for internal use.
ShapePaintStrategy(AffineTransform, Shape) - Constructor for class ballwar.model.paint.ShapePaintStrategy
Constructor that uses a supplied AffineTransform for internal use.
sinA - Variable in class ballwar.model.strategy.CurveStrategy
Pre-calculated value of sin(angle)
SineMaker - Class in util
A utility class that can be used to create smoothly varying sinusoidal numerical data.
SineMaker(double, double, double) - Constructor for class util.SineMaker
The constructor takes several values to control the object's behavior.
Singleton - Static variable in class ballwar.model.paint.EllipseShapeFactory
Singleton pattern
Singleton - Static variable in class ballwar.model.paint.RectangleShapeFactory
Singleton pattern
Singleton - Static variable in class util.Randomizer
 
sm - Variable in class ballwar.model.strategy.BreathingStrategy
A SineMaker object that creates a sinusoidally varying value.
SquarePaintStrategy - Class in ballwar.model.paint
Paint strategy that paints a filled square with the Ball's radius.
SquarePaintStrategy() - Constructor for class ballwar.model.paint.SquarePaintStrategy
No parameter constructor that creates a square with sides of 2 pixels (1 pixel radius) located at the origin.
SquarePaintStrategy(AffineTransform, int, Point) - Constructor for class ballwar.model.paint.SquarePaintStrategy
Constructor that allows one to create the prototype square of arbitrary side and location.
start() - Method in class ballwar.controller.BallControl
Starts the systems running by validating the view and setting to be visible and starting the model.
start() - Method in class ballwar.model.BallModel
Starts the model running by starting the internal timer.
start() - Method in interface ballwar.view.IGameCtrlAdapter
Askas that the model start the game.
stop() - Method in interface ballwar.model.IMoveable
Tells a moveable object to stop moving.
StraightStrategy - Class in ballwar.model.strategy
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).
StraightStrategy() - Constructor for class ballwar.model.strategy.StraightStrategy
 
SwimFishPaintStrategy - Class in ballwar.model.paint
Subclass of AnimatePaintStrategy that alternates between a Fish1PaintStrategy and a Fish2PaintStrategy.
SwimFishPaintStrategy() - Constructor for class ballwar.model.paint.SwimFishPaintStrategy
No-parameter constructor that instantiates an AffineTransform for internal use.
SwimFishPaintStrategy(AffineTransform) - Constructor for class ballwar.model.paint.SwimFishPaintStrategy
Constructor that takes an external AffineTransform for internal use.
SwitcherStrategy - Class in ballwar.model.strategy
A Decorator design pattern strategy that decorates an IUpdateStrategy, enabling the strategy (the decoree) to be switched at run-time.
SwitcherStrategy() - Constructor for class ballwar.model.strategy.SwitcherStrategy
 
switchStrategy(Object) - Method in interface ballwar.view.IBallCtrlAdapter
Tells the model to switch the decoree strategy in the currently defined SwitcherStrategy to a new strategy, as specified by the given factory.

U

update(Observable, Object) - Method in class ballwar.model.Ball
The update method called by the main ball Dispatcher to notify all the balls to perform the given command.
update() - Method in interface ballwar.model.IViewCtrlAdapter
Method that is called when the model wishes the view to update.
update() - Method in class ballwar.view.BallGUI
Updates the view.
updateCollision(Ball, Ball) - Method in interface ballwar.model.IUpdateStrategy
updates the state of the ball in response to a collision between the two balls.
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.ANoOpStrategy
No-op
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.AUpdateStrategy
No-op.
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.ExplodeStrategy
With a given probability, explodes the context ball into a number of smaller balls, unless the context's radius is below a minimum length, upon which the context is killed and no more balls are made.
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.KillStrategy
Kills the target ball (calls its kill() method).
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.LightUpStrategy
I the count is non-positive, saves the color of the context, sets the count to a preset value and sets the color of the context to a preset "lit up" value.
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.MultiStrategy
Delegates first to the first composee and then to the second composee.
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.ScoreStrategy
Adds one to the associated player's score.
updateCollision(Ball, Ball) - Method in class ballwar.model.strategy.SwitcherStrategy
Processes the collision using the decoree.
updateState(Graphics) - Method in class ballwar.model.Ball
Updates the state of the ball by calling the strategy's updateState(), moving the ball as per its velocity, bouncing off the walls if necessary, and notifying all other balls that it may have collided with them.
updateState(Ball) - Method in interface ballwar.model.IUpdateStrategy
Updates the state of the given ball in response to the periodic repainting of the ball as a part of its animation..
updateState(Ball) - Method in class ballwar.model.strategy.ANoOpStrategy
No-op
updateState(Ball) - Method in class ballwar.model.strategy.AUpdateStrategy
Abstract behavior relegated to concrete subclass.
updateState(Ball) - Method in class ballwar.model.strategy.BreathingStrategy
Sets the ball's radius to the current value returned by the SineMaker object.
updateState(Ball) - Method in class ballwar.model.strategy.Change1Strategy
If the counter is zero, sets the context's strategy to a new Change2Strategy.
updateState(Ball) - Method in class ballwar.model.strategy.Change2Strategy
Sets the context's color to a random color.
updateState(Ball) - Method in class ballwar.model.strategy.ColorStrategy
Updates the state of the context by randomly setting its color.
updateState(Ball) - Method in class ballwar.model.strategy.CurveStrategy
Rotates the context's velocity by the specified angle.
updateState(Ball) - Method in class ballwar.model.strategy.DrunkenStrategy
Randomly delegates to one of the four stored strategies as per the following probabilities: s1: 0.64, s2: 0.16, s3: 0.10 and s4: 0.10
updateState(Ball) - Method in class ballwar.model.strategy.LightUpStrategy
Updates the state of the context.
updateState(Ball) - Method in class ballwar.model.strategy.MoveStrategy
If the increment value (delta) is greater than 1, decrement the increment value.
updateState(Ball) - Method in class ballwar.model.strategy.MultiStrategy
Updates the state of the context with the first composee and then the second composee.
updateState(Ball) - Method in class ballwar.model.strategy.StraightStrategy
No-op.
updateState(Ball) - Method in class ballwar.model.strategy.SwitcherStrategy
Updates the state of the context using the decoree.
updateState(Ball) - Method in class ballwar.model.strategy.WanderStrategy
Adds a random vector value to the context's velocity.
util - package util
 

W

WanderStrategy - Class in ballwar.model.strategy
An ANoOpStrategy-based strategy that randomly modifies the velocity whenever the state of the context is updated.
WanderStrategy() - Constructor for class ballwar.model.strategy.WanderStrategy
 
WASDX - Static variable in interface ballwar.model.IMovementKeys
A predefined set of movement keys where "W" = up, "A" = left, "S" = stop, "D" = right, and "X"=down.

_

_addBtn - Variable in class ballwar.view.BallGUI
Button to add the strategy entered in inputTF to both drop lists.
_addPaintBtn - Variable in class ballwar.view.BallGUI
Button to add the paint strategy entered in _paintTF to the drop list.
_ampl - Variable in class util.SineMaker
The amplitude of the sinusoidal output
_bCtrlA - Variable in class ballwar.view.BallGUI
The IBallCtrlAdapter used to control the balls.
_canvasPnl - Variable in class ballwar.view.BallGUI
The panel upon which the balls are painted.
_cbPnl - Variable in class ballwar.view.BallGUI
The sub-panel that holds the drop-lists of strategies and their control buttons.
_clearAllBtn - Variable in class ballwar.view.BallGUI
The button to clear all the balls.
_collisionCmd - Variable in class ballwar.model.Ball
The command sent to the dispatcher to notify the other balls that they may have collided with this ball.
_color - Variable in class ballwar.model.Ball
The color of the ball.
_combineBtn - Variable in class ballwar.view.BallGUI
Button used to combine a selection from _list1CBox and a selection from _list2BCBox into a combined strategy.
_controlPnl - Variable in class ballwar.view.BallGUI
The panel upon which all the game controls are located.
_count - Variable in class ballwar.model.strategy.LightUpStrategy
The count of how many cycles have passed since initially being lit up.
_delta - Variable in class ballwar.model.strategy.MoveStrategy
The amount the ball's velocity is changed in the requested direction each time a key press is registered.
_delta - Variable in class ballwar.model.strategy.WanderStrategy
The maximum absolute value of any of the velocity increment's coordinates.
_delta - Variable in class util.SineMaker
The amount that _theta is incremented each time, in radians.
_DeltaLowerLimit - Static variable in class ballwar.model.strategy.BreathingStrategy
The minumum possible value for the angle increment of the sinusoid between updateState calls, in radians.
_DeltaUpperLimit - Static variable in class ballwar.model.strategy.BreathingStrategy
The maximum possible value for the angle increment of the sinusoid between updateState calls, in radians.
_dispatcher - Variable in class ballwar.model.BallModel
The dispatcher used to communicate with all the balls.
_displayCmd - Variable in class ballwar.model.BallModel
The current command used to generate the display string.
_displayCmd - Variable in class ballwar.view.BallGUI
Display command used to generate the latest display string.
_displayCmdOrig - Variable in class ballwar.model.BallModel
The initial, default command used to generate the initial display string.
_env - Variable in class ballwar.model.Ball
The ball's environment
_gCtrlA - Variable in class ballwar.view.BallGUI
The IGameCtrlAdapter used to control the game.
_graphics - Variable in class ballwar.model.BallModel
Variable used to hold the current Graphics object upon which the balls will next paint.
_inputPnl - Variable in class ballwar.view.BallGUI
The sub-panel that the input textfield is located.
_inputTF - Variable in class ballwar.view.BallGUI
The textfield where the user can type in the classname of a new strategy.
_keysPnl - Variable in class ballwar.controller.BallControl
An OptionPanel used to display the movement keys.
_list1CBox - Variable in class ballwar.view.BallGUI
A drop-list with all the strategies and combinations of strategies.
_list2CBox - Variable in class ballwar.view.BallGUI
Same content as _list1CBox because two lists are needed to create combinations of strategies.
_LitUpColor - Static variable in class ballwar.model.strategy.LightUpStrategy
The color when "lit up"
_LitUpDuration - Static variable in class ballwar.model.strategy.LightUpStrategy
The number of update cycles to remain "lit up".
_location - Variable in class ballwar.model.Ball
The present location of the center of the ball.
_makePlayerBtn - Variable in class ballwar.view.BallGUI
Button to make a new player with the name typed in by the user.
_makeSelectedBtn - Variable in class ballwar.view.BallGUI
Button to make a ball with the selected strategy in _list1CBox.
_makeSwitcherBtn - Variable in class ballwar.view.BallGUI
The button that makes a new ball with a SwitcherStrategy.
_mass - Variable in class ballwar.model.Ball
The mass of the ball
_MaxRadius - Static variable in class ballwar.model.strategy.AUpdateStrategy
The maximum radius that a ball can have.
_MaxRadiusLowerLimit - Static variable in class ballwar.model.strategy.BreathingStrategy
The minimum possible value for the maximum radius of a ball.
_MaxRadiusUpperLimit - Static variable in class ballwar.model.strategy.BreathingStrategy
The maximum possible value for the maximum radius of a ball.
_MaxSpeed - Static variable in class ballwar.model.strategy.AUpdateStrategy
The maximum speed a ball may have.
_MaxVel - Variable in class ballwar.model.strategy.AUpdateStrategy
The minimum and maximum values of a ball's velocityl.
_mid - Variable in class util.SineMaker
The midpoint of the min and max values.
_MinRadius - Static variable in class ballwar.model.strategy.AUpdateStrategy
The minimum radius that a ball can have.
_MinRadius - Static variable in class ballwar.model.strategy.ExplodeStrategy
The minimum radius that will explode.
_MinRadiusLowerLimit - Static variable in class ballwar.model.strategy.BreathingStrategy
The minimum possible value for the minumum radius of a ball.
_MinRadiusUpperLimit - Static variable in class ballwar.model.strategy.BreathingStrategy
The maximum possible value for a ball's minimum radius.
_model - Variable in class ballwar.controller.BallControl
The system's model.
_NBalls - Static variable in class ballwar.model.strategy.ExplodeStrategy
The number of balls to explode into.
_Nudge - Static variable in class ballwar.model.Ball
Percentage amount to "nudge" collided balls away from each other beyond their minimum distance.
_oldColor - Variable in class ballwar.model.strategy.LightUpStrategy
The pre-lit-up color.
_paintCBox - Variable in class ballwar.view.BallGUI
Drop list with available paint strategies.
_paintSelPnl - Variable in class ballwar.view.BallGUI
The sub-panel that the paint selection controls are located.
_paintStrategy - Variable in class ballwar.model.Ball
The paint strategy used by the ball
_paintTF - Variable in class ballwar.view.BallGUI
The textfield where the user can type in the classname of a new painting strategy.
_player - Variable in class ballwar.model.strategy.ScoreStrategy
The IPlayer associated with this scoring strategy.
_playersCBox - Variable in class ballwar.view.BallGUI
Drop list that shows the names of all the players made so far.
_Prob - Static variable in class ballwar.model.strategy.ExplodeStrategy
The probability of explosion.
_radius - Variable in class ballwar.model.Ball
The radius of the ball.
_RadiusDivider - Static variable in class ballwar.model.strategy.ExplodeStrategy
The divisor of the radius when the ball explodes.
_Rand - Static variable in class ballwar.model.strategy.AUpdateStrategy
Randomizer to generate desired random value.
_rand - Variable in class ballwar.model.strategy.WanderStrategy
The Randomizer used to generate the random velocity increment vector's coordinates.
_s1 - Variable in class ballwar.model.strategy.MultiStrategy
First IUpdateStrategy composee
_s2 - Variable in class ballwar.model.strategy.MultiStrategy
Second IUpdateStrategy composee
_statusLbl - Variable in class ballwar.view.BallGUI
Label at the bottom of the screen used to display the status of the game and the player's scores.
_strategy - Variable in class ballwar.model.Ball
The update strategy used by the ball
_strategy - Variable in class ballwar.model.strategy.SwitcherStrategy
 
_switchBtn - Variable in class ballwar.view.BallGUI
The button that switches the decoree in the SwitcherStrategy to the currently selected strategey.
_switcher - Variable in class ballwar.model.BallModel
The SwitcherStrategy object to use in switcher balls.
_switcherPnl - Variable in class ballwar.view.BallGUI
The sub-panel that holds the SwitcherStrategy controls.
_theta - Variable in class util.SineMaker
The current angle used to generate the current sinusoidal value.
_timer - Variable in class ballwar.model.BallModel
A timer object that is the main clock that drives the simulation.
_timeSlice - Variable in class ballwar.model.BallModel
The time in milliseconds between updates to the balls.
_updateStateCmd - Variable in class ballwar.model.BallModel
The command used when the balls are told to update their states and paint.
_vCtrlA - Variable in class ballwar.model.BallModel
The adapter to the view.
_velocity - Variable in class ballwar.model.Ball
The current velocity of the ball.
_view - Variable in class ballwar.controller.BallControl
The system's view (GUI).
_windowListener - Variable in class ballwar.controller.BallControl
The window listener used by the view when the window is closed.

A B C D E F G H I K L M N O P R S U W _