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

A

act() - Method in class breakout.SingleShotBall
 
act() - Method in class breakout.SimpleBall
 
act() - Method in class breakout.DefaultActiveBreakoutComponent
subclasses must implement the act method to have the component interact with the world after moving.
act() - Method in class breakout.BlinkBrick
 
act() - Method in interface breakout.ActiveBreakoutComponent
actively interact with the world.
actionPerformed(ActionEvent) - Method in class breakout.NetworkSettings
Responds to user button-pushes.
actionPerformed(ActionEvent) - Method in class breakout.GameFrame
 
ActiveBreakoutComponent - interface breakout.ActiveBreakoutComponent.
interface ActiveBreakoutComponent is a BreakoutComponent that acts on it own and has a velocity.
ADD_BRICK - Static variable in class breakout.WorldEvent
brick added to world event
add(BreakoutComponent) - Method in class breakout.WorldState
adds the component to the world and sends a WorldEvent if the component added was a brick.
add(BreakoutComponent) - Method in interface breakout.World
adds a component to the world
add(BreakoutComponent) - Method in class breakout.GameFrame
 
addMouseAware(BreakoutComponent) - Method in class breakout.WorldState
adds the component to the world using the add method and then registers the component with the GUI as a MouseListener and MouseMotionListener.
addMouseAware(BreakoutComponent) - Method in interface breakout.World
adds a component to the world and adds it to the MouseListeners and MouseMotionListeners
addWorldListener(WorldListener) - Method in class breakout.WorldState
 
addWorldListener(WorldListener) - Method in interface breakout.World
adds the given listener to the list of objects to be informed of changes in the world state

B

BadBoardFormatException - exception breakout.BadBoardFormatException.
BadBoardFormatException is thrown when a board file doesn't meet spec.
BadBoardFormatException() - Constructor for class breakout.BadBoardFormatException
 
BadBoardFormatException(String) - Constructor for class breakout.BadBoardFormatException
 
Ball - interface breakout.Ball.
interface Ball provides an indication of a component's Ball-ness.
BALL_TRANSFER - Static variable in class breakout.WorldEvent
ball transferred out of world event
BallBrick - class breakout.BallBrick.
A brick that releases a Ball when destroyed.
BallBrick(Point, Dimension, World, Color, int) - Constructor for class breakout.BallBrick
 
ballLeft(Ball) - Method in class breakout.WorldState
 
ballLeft(Ball) - Method in interface breakout.World
signal that the given ball has left the board for a better place (the other board).
ballLeft(WorldEvent) - Method in interface breakout.WorldListener
invoked when a ball leaves the world for another.
ballLeft(WorldEvent) - Method in class breakout.StudentConnector
 
BenSimpleBrick - class breakout.BenSimpleBrick.
Possible student code that implements a basic brick.
BenSimpleBrick(Point, Dimension) - Constructor for class breakout.BenSimpleBrick
 
BenSimpleBrick(Point, Dimension, World, Color, int) - Constructor for class breakout.BenSimpleBrick
 
BlinkBrick - class breakout.BlinkBrick.
A brick that blinks between two colors.
BlinkBrick(Point, Dimension, World, Color, int) - Constructor for class breakout.BlinkBrick
 
BoardLoader - class breakout.BoardLoader.
loads a board from a file, adding bricks to the world it was constructed with.
BoardLoader(World) - Constructor for class breakout.BoardLoader
build with given World object target.
breakout - package breakout
 
BreakoutComponent - interface breakout.BreakoutComponent.
interface BreakoutComponent is the basic element of the breakout system.
Brick - interface breakout.Brick.
interface Brick provides a way to indicate whether a component is brick-like
Bumper - class breakout.Bumper.
A Bumper is a mouse-controlled component that the user uses to keep balls in play.
Bumper(Point, Dimension, World) - Constructor for class breakout.Bumper
 

C

componentAdded(WorldEvent) - Method in interface breakout.WorldListener
invoked when a component is added to the world.
componentAdded(WorldEvent) - Method in class breakout.StudentConnector
 
componentRemoved(WorldEvent) - Method in interface breakout.WorldListener
invoked when a component is removed from the world.
componentRemoved(WorldEvent) - Method in class breakout.StudentConnector
 
connect() - Method in class breakout.StudentConnector
 
connect() - Method in interface breakout.Connector
The connector implementation should attempt to connect to the other party.
Connector - interface breakout.Connector.
interface Connector implementations connect the local instance of the breakout game to a remote instance of the breakout game.
createEvent(int, BreakoutComponent) - Static method in class breakout.WorldEvent
factory method for building WorldEvent given a Breakout component.

D

DEFAULT_SPEED - Static variable in interface breakout.Ball
standard ball speed
DefaultActiveBreakoutComponent - class breakout.DefaultActiveBreakoutComponent.
abstract class DefaultActiveBreakoutComponent provides most of the implementation of the ActiveBreakoutComponent interface, leaving the paint, hitBy, and act methods to the subclasser.
DefaultActiveBreakoutComponent(Point, Dimension, World, Point, int) - Constructor for class breakout.DefaultActiveBreakoutComponent
 
DefaultBreakoutComponent - class breakout.DefaultBreakoutComponent.
abstract class DefaultBreakoutComponent provides a partial implementation of the BreakoutComponent interface.
DefaultBreakoutComponent(Point, Dimension) - Constructor for class breakout.DefaultBreakoutComponent
without world constructor.
DefaultBreakoutComponent(Point, Dimension, World) - Constructor for class breakout.DefaultBreakoutComponent
Default constructor creates the component at a given location and size.

E

EAST - Variable in class breakout.WorldState
 

F

FRAMES_PER_SECOND - Static variable in class breakout.GameBoard
 

G

GameBoard - class breakout.GameBoard.
GameBoard is responsible for rendering a World to the screen.
GameBoard(World, boolean) - Constructor for class breakout.GameBoard
 
GameFrame - class breakout.GameFrame.
class GameFrame is the main application window.
GameFrame() - Constructor for class breakout.GameFrame
 
GameFrame(NetworkSettings) - Constructor for class breakout.GameFrame
 
getAction() - Method in class breakout.WorldEvent
getter for action
getBallsLeft() - Method in class breakout.WorldState
 
getBallsLeft() - Method in interface breakout.World
returns the number of balls left.
getCenter() - Method in class breakout.DefaultBreakoutComponent
returns a point that corresponds to the center of the component.
getCenter() - Method in class breakout.DefaultActiveBreakoutComponent
returns a point that corresponds to the center of the component.
getCenter() - Method in interface breakout.BreakoutComponent
returns a point at the center of the component
getDirection() - Method in class breakout.WorldEvent
getter for direction
getDirection() - Method in class breakout.DefaultActiveBreakoutComponent
returns a new Point corresponding to the direction of the component's motion.
getDirection() - Method in interface breakout.ActiveBreakoutComponent
returns a Point representing the direction the component is travelling.
getHost() - Method in class breakout.NetworkSettings
returns the name of the host to connect to as a client.
getLocation() - Method in class breakout.WorldEvent
getter for location
getLocation() - Method in class breakout.DefaultBreakoutComponent
returns a new Point corresponding to the location of the component's upper-left corner.
getLocation() - Method in class breakout.DefaultActiveBreakoutComponent
returns a new Point corresponding to the location of the component's upper-left corner.
getLocation() - Method in interface breakout.BreakoutComponent
returns location of upper-left corner of component
getPort() - Method in class breakout.NetworkSettings
returns the requested port.
getSettings() - Method in class breakout.NetworkSettings
Requests that the frame be shown to the user.
getShape() - Method in class breakout.SimpleBall
 
getShape() - Method in class breakout.DefaultBreakoutComponent
returns a Rectangle at location with size.
getShape() - Method in class breakout.DefaultActiveBreakoutComponent
returns a Rectangle at location with size.
getShape() - Method in interface breakout.BreakoutComponent
returns the actual shape of the object.
getSize() - Method in class breakout.WorldEvent
getter for size
getSize() - Method in class breakout.DefaultBreakoutComponent
returns the Dimensions of the component.
getSize() - Method in class breakout.DefaultActiveBreakoutComponent
returns the Dimensions of the component.
getSize() - Method in interface breakout.BreakoutComponent
returns the width and height of the bounding rectangle of the component.
getState() - Method in class breakout.NetworkSettings
Returns the requested state of network connectivity
getTimeBetweenActs() - Method in class breakout.DefaultActiveBreakoutComponent
returns the number of milliseconds between calls to act
getTimeBetweenActs() - Method in interface breakout.ActiveBreakoutComponent
returns the time in milliseconds between act()s.

H

hitBy(BreakoutComponent) - Method in class breakout.Wall
Walls do nothing when struck.
hitBy(BreakoutComponent) - Method in class breakout.TransferWall
Balls that strike this are indicated to the world as leaving.
hitBy(BreakoutComponent) - Method in class breakout.SimpleBall
 
hitBy(BreakoutComponent) - Method in class breakout.KillerWall
kills any component that hits it.
hitBy(BreakoutComponent) - Method in class breakout.DefaultBreakoutComponent
subclasses must implement the hitBy method to have the component react to being struck.
hitBy(BreakoutComponent) - Method in class breakout.DefaultActiveBreakoutComponent
subclasses must implement the hitBy method to have the component react to being struck.
hitBy(BreakoutComponent) - Method in class breakout.Bumper
Bumpers don't do anything when hit by balls.
hitBy(BreakoutComponent) - Method in interface breakout.BreakoutComponent
the component has been struck by the given component
hitBy(BreakoutComponent) - Method in class breakout.BlinkBrick
 
hitBy(BreakoutComponent) - Method in class breakout.BenSimpleBrick
 
hitBy(BreakoutComponent) - Method in class breakout.BallBrick
 

I

intersects(BreakoutComponent) - Method in class breakout.WorldState
Assumes the component checking for intersections is rectangular.
intersects(BreakoutComponent) - Method in interface breakout.World
tests to see if anything else in the world intersects with the given component.
isConnected() - Method in class breakout.StudentConnector
 
isConnected() - Method in interface breakout.Connector
returns true if the connector is connected to the partner game.
isDead() - Method in class breakout.DefaultBreakoutComponent
 
isDead() - Method in class breakout.DefaultActiveBreakoutComponent
 
isDead() - Method in interface breakout.BreakoutComponent
returns dead status of component.
isTransient() - Method in class breakout.SingleShotBall
 
isTransient() - Method in class breakout.DefaultBreakoutComponent
The default component is not transient.
isTransient() - Method in class breakout.DefaultActiveBreakoutComponent
 
isTransient() - Method in interface breakout.BreakoutComponent
returns true if the component is transient.
iterator() - Method in class breakout.WorldState
Returns an iterator that supports the remove operation.
iterator() - Method in interface breakout.World
returns an iterator over the elements of the World

K

kill() - Method in class breakout.Wall
overridden to prevent Walls from getting killed.
kill() - Method in class breakout.DefaultBreakoutComponent
 
kill() - Method in class breakout.DefaultActiveBreakoutComponent
 
kill() - Method in interface breakout.BreakoutComponent
destroys this component
killAll() - Method in class breakout.WorldState
 
killAll() - Method in interface breakout.World
kills all components except the walls and empties the vector.
KillerWall - class breakout.KillerWall.
A KillerWall kills anything that hits it.
KillerWall(Point, Dimension, World) - Constructor for class breakout.KillerWall
 

L

load(BufferedReader) - Method in class breakout.BoardLoader
Load board from given BufferedReader.
load(File) - Method in class breakout.BoardLoader
Load board from given file.

M

Main - class breakout.Main.
Creates the GUI and determines whether to prompt the user for their network settings.
Main() - Constructor for class breakout.Main
 
main(String[]) - Static method in class breakout.Main
Start the breakout program running
MAXX - Static variable in interface breakout.World
maximum X value
MAXY - Static variable in interface breakout.World
maximum Y value
mouseClicked(MouseEvent) - Method in class breakout.ShooterBumper
When mouse is clicked, creates a SingleShotBall going straight up centered on the Bumper.
mouseClicked(MouseEvent) - Method in class breakout.Bumper
 
mouseDragged(MouseEvent) - Method in class breakout.Bumper
 
mouseEntered(MouseEvent) - Method in class breakout.Bumper
 
mouseExited(MouseEvent) - Method in class breakout.Bumper
 
mouseMoved(MouseEvent) - Method in class breakout.Bumper
Bumper centers on the X coordinate of the mouse, while staying within the bounds of the world.
mousePressed(MouseEvent) - Method in class breakout.Bumper
 
mouseReleased(MouseEvent) - Method in class breakout.Bumper
 

N

NETWORK_CLIENT - Static variable in class breakout.NetworkSettings
user requested that this instance be a client
NETWORK_NONE - Static variable in class breakout.NetworkSettings
user requested no network connection
NETWORK_SERVER - Static variable in class breakout.NetworkSettings
user requested that this instance be a server
NetworkSettings - class breakout.NetworkSettings.
NetworkSettings is a stateful window that is used to query the user's desired network parameters.
NetworkSettings() - Constructor for class breakout.NetworkSettings
Builds a frame to ask for user's network settings, but doesn't display it
NORTH - Variable in class breakout.WorldState
 

O

OtherBrick - class breakout.OtherBrick.
A Brick that renders with a question mark and is used by the StudentConnector to represent bricks on the partner's game.
OtherBrick(Point, Dimension, World) - Constructor for class breakout.OtherBrick
 

P

paint(Graphics) - Method in class breakout.Wall
Walls render as white rectangles of the appropriate size
paint(Graphics) - Method in class breakout.SimpleBall
 
paint(Graphics) - Method in class breakout.ShooterBumper
renders like bumper, but also displays ammo left in green.
paint(Graphics) - Method in class breakout.OtherBrick
 
paint(Graphics) - Method in class breakout.DefaultBreakoutComponent
subclasses must implement the paint method in order to draw their component.
paint(Graphics) - Method in class breakout.DefaultActiveBreakoutComponent
subclasses must implement the paint method in order to draw their component.
paint(Graphics) - Method in class breakout.Bumper
Bumpers render as white rectangles.
paint(Graphics) - Method in interface breakout.BreakoutComponent
renders this component to the screen.
paint(Graphics) - Method in class breakout.BlinkBrick
 
paint(Graphics) - Method in class breakout.BenSimpleBrick
 
paintComponent(Graphics) - Method in class breakout.StatusComponent
 
paintComponent(Graphics) - Method in class breakout.GameBoard
 
playing() - Method in class breakout.WorldState
 
playing() - Method in interface breakout.World
returns true if a game is in progress.

R

rebound(BreakoutComponent, BreakoutComponent) - Method in class breakout.WorldState
Assumes that two active components rebounding are equal mass and non active components have infinite mass.
rebound(BreakoutComponent, BreakoutComponent) - Method in interface breakout.World
rebound causes the two entities to rebound off each other, mutating their DX and DY values.
REFRESH_INTERVAL - Static variable in class breakout.StatusComponent
 
REMOVE_BRICK - Static variable in class breakout.WorldEvent
brick removed from world event
removeAt(Point) - Method in class breakout.WorldState
 
removeAt(Point) - Method in interface breakout.World
removes the component at the given coordinates.
run() - Method in class breakout.StudentConnector
reads WorldEvents off the network and adds or removes components as directed.
run() - Method in class breakout.StatusComponent
 
run() - Method in class breakout.GameBoard
 
run() - Method in class breakout.DefaultActiveBreakoutComponent
sleeps timeBetweenActs milliseconds, updates position, then invokes act

S

setDirection(Point) - Method in class breakout.DefaultActiveBreakoutComponent
Sets the direction of motion of the component.
setDirection(Point) - Method in interface breakout.ActiveBreakoutComponent
sets the direction of the component.
setLocation(Point) - Method in class breakout.DefaultBreakoutComponent
changes the location of the component's upper left corner to the given location.
setLocation(Point) - Method in class breakout.DefaultActiveBreakoutComponent
changes the location of the component's upper left corner to the given location.
setLocation(Point) - Method in interface breakout.BreakoutComponent
sets the location of upper-left corner of component
setWorld(World) - Method in class breakout.DefaultBreakoutComponent
 
setWorld(World) - Method in class breakout.DefaultActiveBreakoutComponent
 
setWorld(World) - Method in interface breakout.BreakoutComponent
sets the world the component lives in
SHAPE_PRECISION - Static variable in interface breakout.World
This is the maximum distance between any two consecutive points in a shape describing a DefaultBreakoutComponent (in units of pixels)
ShooterBumper - class breakout.ShooterBumper.
A cooler Bumper that shoots SingleShotBalls when the user clicks the mouse.
ShooterBumper(Point, Dimension, World, int) - Constructor for class breakout.ShooterBumper
 
SimpleBall - class breakout.SimpleBall.
SimpleBall is an active component that bounces around hitting things.
SimpleBall(Point, Dimension, World, double, int, Color) - Constructor for class breakout.SimpleBall
 
SimpleBall(Point, Dimension, World, Point, int, Color) - Constructor for class breakout.SimpleBall
 
SingleShotBall - class breakout.SingleShotBall.
SingleShotBall is a transient ball that hits exactly one thing.
SingleShotBall(Point, Dimension, World, Point, int, Color, BreakoutComponent) - Constructor for class breakout.SingleShotBall
 
SOUTH - Variable in class breakout.WorldState
 
startPlaying() - Method in class breakout.WorldState
 
startPlaying() - Method in interface breakout.World
indicate that game should start.
StatusComponent - class breakout.StatusComponent.
a little component that queries the World and Connector to display the number of balls remaining and the connected status
StatusComponent(World, Connector) - Constructor for class breakout.StatusComponent
 
StudentConnector - class breakout.StudentConnector.
class StudentConnector is a possibly student-written class that implements the connection between the local breakout game and the partner's breakout game.
StudentConnector(World, World, NetworkSettings) - Constructor for class breakout.StudentConnector
 

T

TransferWall - class breakout.TransferWall.
A TransferWall indicates that Balls that strike it should leave the World for another.
TransferWall(Point, Dimension, World) - Constructor for class breakout.TransferWall
 

W

Wall - class breakout.Wall.
A Wall is an unkillable component used to edge in the World and prevent balls from escaping.
Wall(Point, Dimension, World) - Constructor for class breakout.Wall
 
WEST - Variable in class breakout.WorldState
 
windowActivated(WindowEvent) - Method in class breakout.GameFrame
 
windowClosed(WindowEvent) - Method in class breakout.GameFrame
 
windowClosing(WindowEvent) - Method in class breakout.GameFrame
 
windowDeactivated(WindowEvent) - Method in class breakout.GameFrame
 
windowDeiconified(WindowEvent) - Method in class breakout.GameFrame
 
windowIconified(WindowEvent) - Method in class breakout.GameFrame
 
windowOpened(WindowEvent) - Method in class breakout.GameFrame
 
World - interface breakout.World.
public interface World encapsulates how BreakoutComponents and exterior entites interact with a game world.
WorldEvent - class breakout.WorldEvent.
class WorldEvent embodies a change to state of the World as reported to a WorldListener.
WorldListener - interface breakout.WorldListener.
interface WorldListener is for objects that want to hear about changes in the world state.
WorldState - class breakout.WorldState.
WorldState implements the World interface, providing an augmented container for BreakoutComponents.
WorldState(boolean) - Constructor for class breakout.WorldState
Builds a WorldState object with only the components that make up the walls.

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