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

<

() - Method in class spacewar.SpaceObject
() - Method in class spacewar.Registry
() - Method in class spacewar.Game

A

accelerate(double, double) - Method in class spacewar.SpaceObject
actionPerformed(ActionEvent) - Method in class spacewar.SWFrame
addExclusion(Exclusion) - Method in class coordination.Method
addMutex(String[]) - Method in class coordination.Coordinator
Takes an array of multi-part method names and marks those methods as mutually exclusive.
addRobot() - Method in class spacewar.Game
addSelfex(String) - Method in class coordination.Coordinator
Takes a multi-part method name (eg "BoundedBuffer.put") and marks that method as self-exclusive.

B

bounce(Ship, Ship) - Static method in class spacewar.Ship
bullet - Variable in class spacewar.Display1.BulletDA
bullet - Variable in class spacewar.Display2.BulletDA
Bullet - class spacewar.Bullet.
BULLET_SPEED - Static variable in class spacewar.Ship
Bullet(Game, double, double, double, double) - Constructor for class spacewar.Bullet

C

checkit() - Method in interface coordination.Condition
This method is called automatically by Coordinator.guardedEntry(...) and it's called everytime the coordination state changes.
clockTick() - Method in class spacewar.SpaceObject
Move 1 unit of time's worth of distance.
clockTick() - Method in class spacewar.Registry
clockTick() - Method in class spacewar.Game
clockTick() - Method in class spacewar.Bullet
clockTick() - Method in class spacewar.Ship
CLOCKWISE - Static variable in class spacewar.Ship
color - Variable in class spacewar.Display1.ShipDA
color - Variable in class spacewar.Display2.ShipDA
Condition - interface coordination.Condition.
Interface for pre-conditions that are passed to guardedEntry methods of Coordinator.
coordination - package coordination
 
CoordinationAction - interface coordination.CoordinationAction.
Interface for coordination actions that are passed to guardedEntry methods of Coordinator.
Coordinator - class coordination.Coordinator.
The Coordinator class provides the basic functionality for synchronizing and coordinating different threads upon entering and exiting methods.
Coordinator() - Constructor for class coordination.Coordinator
count - Variable in class coordination.Selfex
COUNTERCLOCKWISE - Static variable in class spacewar.Ship

D

DEFAULT_ACCELERATION - Static variable in class spacewar.Ship
DEFAULT_ANGULAR_VELOCITY - Static variable in class spacewar.Ship
destroy() - Method in class spacewar.Robot
die() - Method in class spacewar.SpaceObject
Display - class spacewar.Display.
The display aspects capture the look and feel of the in modular pluggable units.
Display(Game) - Constructor for class spacewar.Display
Display1 - class spacewar.Display1.
This is the standard display aspect.
Display1.BulletDA - class spacewar.Display1.BulletDA.
Display1.BulletDA() - Constructor for class spacewar.Display1.BulletDA
 
Display1.EnergyPacketDA - class spacewar.Display1.EnergyPacketDA.
Display1.EnergyPacketDA() - Constructor for class spacewar.Display1.EnergyPacketDA
 
Display1.ShipDA - class spacewar.Display1.ShipDA.
Display1.ShipDA() - Constructor for class spacewar.Display1.ShipDA
 
Display1.SpaceObjectDA - class spacewar.Display1.SpaceObjectDA.
Display1.SpaceObjectDA() - Constructor for class spacewar.Display1.SpaceObjectDA
 
Display1(Game) - Constructor for class spacewar.Display1
Display2 - class spacewar.Display2.
This is the cheap Display aspect.
Display2.BulletDA - class spacewar.Display2.BulletDA.
Display2.BulletDA() - Constructor for class spacewar.Display2.BulletDA
 
Display2.EnergyPacketDA - class spacewar.Display2.EnergyPacketDA.
Display2.EnergyPacketDA() - Constructor for class spacewar.Display2.EnergyPacketDA
 
Display2.ShipDA - class spacewar.Display2.ShipDA.
Display2.ShipDA() - Constructor for class spacewar.Display2.ShipDA
 
Display2.SpaceObjectDA - class spacewar.Display2.SpaceObjectDA.
Display2.SpaceObjectDA() - Constructor for class spacewar.Display2.SpaceObjectDA
 
Display2(Game) - Constructor for class spacewar.Display2
doit() - Method in interface coordination.CoordinationAction
This method is called by Coordinator.guardedEntry(...) and Coordinator.guardedExit(...).
dummy() - Method in class spacewar.Registry

E

energyPacket - Variable in class spacewar.Display1.EnergyPacketDA
energyPacket - Variable in class spacewar.Display2.EnergyPacketDA
EnergyPacket - class spacewar.EnergyPacket.
EnergyPacket(Game, double, double, double, double, double) - Constructor for class spacewar.EnergyPacket
EnergyPacketProducer - class spacewar.EnergyPacketProducer.
EnergyPacketProducer(Game) - Constructor for class spacewar.EnergyPacketProducer
EnsureShipIsAlive - class spacewar.EnsureShipIsAlive.
EnsureShipIsAlive() - Constructor for class spacewar.EnsureShipIsAlive
 
enterExclusion(String) - Method in interface coordination.Exclusion
enterExclusion(String) - Method in class coordination.Selfex
enterExclusion(String) - Method in class coordination.Mutex
enterInThread(Thread) - Method in class coordination.MethodState
error(Object) - Method in class spacewar.Game
Exclusion - interface coordination.Exclusion.
exes - Variable in class coordination.Method
exitExclusion(String) - Method in interface coordination.Exclusion
exitExclusion(String) - Method in class coordination.Selfex
exitExclusion(String) - Method in class coordination.Mutex
exitInThread(Thread) - Method in class coordination.MethodState
expendEnergy(double) - Method in class spacewar.Ship

F

fire - Variable in class spacewar.KeyMapping
fire() - Method in class spacewar.Ship
frame - Variable in class spacewar.Display

G

game - Variable in class spacewar.Display
Game - class spacewar.Game.
The Game class is the root of the spacewar game.
Game(String) - Constructor for class spacewar.Game
To run the game, simply instantiate this class.
GameCoordinator - class spacewar.GameCoordinator.
This aspect ensures synchronized access to methods of the Game in the presence of several threads.
GameCoordinator() - Constructor for class spacewar.GameCoordinator
getDamage() - Method in class spacewar.Ship
getDamageLevel() - Method in class spacewar.Ship
getDisplay() - Method in class spacewar.SWFrame
getEnergy() - Method in class spacewar.EnergyPacket
getEnergy() - Method in class spacewar.Ship
getEnergyLevel() - Method in class spacewar.Ship
getGame() - Method in class spacewar.SpaceObject
getGame() - Method in class spacewar.Display
getGame() - Method in class spacewar.Pilot
getGame() - Method in class spacewar.Registry
getGame() - Method in class spacewar.Timer
getGame() - Method in class spacewar.SWFrame
getGame() - Method in class spacewar.EnergyPacketProducer
getHeight() - Method in class spacewar.Game
getMenu() - Method in class spacewar.SWFrame
getNumber() - Method in class spacewar.Pilot
getObjects() - Method in class spacewar.Registry
getOldXPos() - Method in class spacewar.SpaceObject
getOldYPos() - Method in class spacewar.SpaceObject
getOrientation() - Method in class spacewar.Ship
getPilot() - Method in class spacewar.Ship
getPilot1() - Static method in class spacewar.Display
getPilot1() - Method in class spacewar.Game
getPilot2() - Static method in class spacewar.Display
getPilot2() - Method in class spacewar.Game
getRAcc() - Method in class spacewar.Ship
getRegistry() - Method in class spacewar.Game
getShip() - Method in class spacewar.Pilot
getShips() - Method in class spacewar.Registry
getSize() - Method in class spacewar.SpaceObject
getSize() - Method in class spacewar.EnergyPacket
getSize() - Method in class spacewar.Bullet
getSize() - Method in class spacewar.Ship
getTable() - Method in class spacewar.Registry
getWidth() - Method in class spacewar.Game
getXPos() - Method in class spacewar.SpaceObject
getXVel() - Method in class spacewar.SpaceObject
getYPos() - Method in class spacewar.SpaceObject
getYVel() - Method in class spacewar.SpaceObject
guardedEntry(String) - Method in class coordination.Coordinator
This method is the guard for enforcing all synchronization and coordination constraints of a given method, and it should be called just before the method is executed.
guardedEntry(String, Condition) - Method in class coordination.Coordinator
Just like guardedEntry(String methName), but the given method is executed only when the given condition is true.
guardedEntry(String, Condition, CoordinationAction) - Method in class coordination.Coordinator
Just like guardedEntry(String methName), but the given method is executed only when the given condition is true; the additional coordination action that is executed before the given method is executed.
guardedEntry(String, CoordinationAction) - Method in class coordination.Coordinator
Just like guardedEntry(String methName), but with an additional coordination action that is executed before the given method is executed.
guardedEntryWithTimeout(String, Condition, CoordinationAction, long) - Method in class coordination.Coordinator
This method is similar to guardedEntry, but it takes an additional parameter - the milliseconds after which any suspension will abort with a timeout.
guardedEntryWithTimeout(String, Condition, long) - Method in class coordination.Coordinator
This method is similar to guardedEntry, but it takes an additional parameter - the milliseconds after which any suspension will abort with a timeout.
guardedEntryWithTimeout(String, CoordinationAction, long) - Method in class coordination.Coordinator
This method is similar to guardedEntry, but it takes an additional parameter - the milliseconds after which any suspension will abort with a timeout.
guardedEntryWithTimeout(String, long) - Method in class coordination.Coordinator
This method is similar to guardedEntry, but it takes an additional parameter - the milliseconds after which any suspension will abort with a timeout.
guardedExit(String) - Method in class coordination.Coordinator
This method provides the means for updating all synchronization and coordination state after the execution of a given method, and it should be called after the method is executed.
guardedExit(String, CoordinationAction) - Method in class coordination.Coordinator
Just like guardedExit(String methName) but with an additional coordination action that is executed.

H

handleCollision(SpaceObject) - Method in class spacewar.SpaceObject
handleCollision(SpaceObject) - Method in class spacewar.EnergyPacket
handleCollision(SpaceObject) - Method in class spacewar.Bullet
handleCollision(SpaceObject) - Method in class spacewar.Ship
handleCollisions() - Method in class spacewar.Game
hasOtherThreadThan(Thread) - Method in class coordination.MethodState

I

inflictDamage(double) - Method in class spacewar.Ship
isAlive() - Method in class spacewar.SpaceObject
isCollision(SpaceObject, SpaceObject) - Static method in class spacewar.Game

K

KeyMapping - class spacewar.KeyMapping.
KeyMapping(int, int, int, int, int) - Constructor for class spacewar.KeyMapping
keyMapping1 - Static variable in class spacewar.KeyMapping
keyMapping2 - Static variable in class spacewar.KeyMapping
keyPressed(KeyEvent) - Method in class spacewar.Player
keyReleased(KeyEvent) - Method in class spacewar.Player
keyTyped(KeyEvent) - Method in class spacewar.Player

L

left - Variable in class spacewar.KeyMapping

M

main(String[]) - Static method in class spacewar.Game
To run the game from top level, simply say Java Game, as usual.
MAX_DAMAGE - Static variable in class spacewar.Ship
Method - class coordination.Method.
Method(String) - Constructor for class coordination.Method
methodName - Variable in class coordination.Selfex
methodNames - Variable in class coordination.Mutex
MethodState - class coordination.MethodState.
MethodState() - Constructor for class coordination.MethodState
 
methodStates - Variable in class coordination.Mutex
Mutex - class coordination.Mutex.
Mutex(String[]) - Constructor for class coordination.Mutex

N

name - Variable in class coordination.Method
newPlayer(int) - Method in class spacewar.Game
newRobot(int) - Method in class spacewar.Game
newShip(Pilot) - Method in class spacewar.Game
noticeSizeChange() - Method in class spacewar.Display
noticeSizeChange() - Method in class spacewar.Display1
noticeSizeChange() - Method in class spacewar.Display2

O

offGraphics - Variable in class spacewar.Display
offImage - Variable in class spacewar.Display

P

paint(Graphics) - Method in class spacewar.Display
paint(Graphics) - Method in class spacewar.Display1.SpaceObjectDA
paint(Graphics) - Method in class spacewar.Display1.ShipDA
paint(Graphics) - Method in class spacewar.Display1.BulletDA
paint(Graphics) - Method in class spacewar.Display1.EnergyPacketDA
paint(Graphics) - Method in class spacewar.Display2.SpaceObjectDA
paint(Graphics) - Method in class spacewar.Display2.ShipDA
paint(Graphics) - Method in class spacewar.Display2.BulletDA
paint(Graphics) - Method in class spacewar.Display2.EnergyPacketDA
paintLevels(Graphics, Ship, int, int) - Static method in class spacewar.Display1
paintLevels(Graphics, Ship, int, int) - Method in class spacewar.Display2
paintObjects(Graphics) - Method in class spacewar.Display
paintObjects(Graphics) - Method in class spacewar.Display1
paintObjects(Graphics) - Method in class spacewar.Display2
paintStatus(Graphics) - Method in class spacewar.Display
paintStatus(Graphics) - Method in class spacewar.Display1
paintStatus(Graphics) - Method in class spacewar.Display2
Pilot - class spacewar.Pilot.
Pilot is the abstract superclass of Player and Robot.
Pilot(Game, int) - Constructor for class spacewar.Pilot
Player - class spacewar.Player.
Player(Game, int) - Constructor for class spacewar.Player
prettyName - Variable in class coordination.Mutex
printNames() - Method in interface coordination.Exclusion
printNames() - Method in class coordination.Selfex
printNames() - Method in class coordination.Mutex
produceAPacket() - Method in class spacewar.EnergyPacketProducer

Q

quit() - Method in class spacewar.Game

R

register(SpaceObject) - Method in class spacewar.Registry
Registry - class spacewar.Registry.
The Registry keeps track of all the space objects that are floating around.
Registry(Game) - Constructor for class spacewar.Registry
RegistryCoordinator - class spacewar.RegistryCoordinator.
This aspect ensures synchronized access to methods of the Registry in the presence of several threads.
RegistryCoordinator() - Constructor for class spacewar.RegistryCoordinator
removeExclusion(Exclusion) - Method in class coordination.Method
removeMutex(String[]) - Method in class coordination.Coordinator
Takes an array of multi-part method names that correspond to an existing mutex set and remove the mutual exclusion constraint.
removeSelfex(String) - Method in class coordination.Coordinator
Takes a multi-part method name (e.g.
repairDamage(double) - Method in class spacewar.Ship
resetShips() - Method in class spacewar.Game
right - Variable in class spacewar.KeyMapping
Robot - class spacewar.Robot.
Robot is an automatic pilot that now has quite a bit of intelligence.
Robot(Game, int) - Constructor for class spacewar.Robot
rotate(int) - Method in class spacewar.Ship
run() - Method in class spacewar.Robot
run() - Method in class spacewar.Game
run() - Method in class spacewar.Timer
run() - Method in class spacewar.EnergyPacketProducer

S

Selfex - class coordination.Selfex.
Selfex(String) - Constructor for class coordination.Selfex
setAcceleration(double) - Method in class spacewar.Ship
First check to make sure we have enough energy to accelerate.
setAngularVelocity(double) - Method in class spacewar.Ship
setIsAlive(boolean) - Method in class spacewar.SpaceObject
setPilot(Pilot) - Method in class spacewar.Ship
setShip(Ship) - Method in class spacewar.Pilot
setXVel(double) - Method in class spacewar.SpaceObject
setYVel(double) - Method in class spacewar.SpaceObject
ship - Variable in class spacewar.Display1.ShipDA
ship - Variable in class spacewar.Pilot
ship - Variable in class spacewar.Display2.ShipDA
Ship - class spacewar.Ship.
Ship(Game, double, double, double) - Constructor for class spacewar.Ship
sleepForABit(int) - Method in class spacewar.Robot
SpaceObject - class spacewar.SpaceObject.
SpaceObjects are objects that float around in space.
SpaceObject(Game, double, double, double, double) - Constructor for class spacewar.SpaceObject
spacewar - package spacewar
 
start() - Method in class spacewar.Robot
stop - Variable in class spacewar.KeyMapping
STOP - Static variable in class spacewar.Ship
stop() - Method in class spacewar.Ship
SWFrame - class spacewar.SWFrame.
SWFrame(Game, Display) - Constructor for class spacewar.SWFrame

T

testExclusion(String) - Method in interface coordination.Exclusion
testExclusion(String) - Method in class coordination.Selfex
testExclusion(String) - Method in class coordination.Mutex
thread - Variable in class coordination.Selfex
threads - Variable in class coordination.MethodState
thrust - Variable in class spacewar.KeyMapping
thrust(boolean) - Method in class spacewar.Ship
time - Variable in class coordination.TimeoutException
TimeoutException - exception coordination.TimeoutException.
TimeoutException(long) - Constructor for class coordination.TimeoutException
Timer - class spacewar.Timer.
Timer(Game) - Constructor for class spacewar.Timer

U

unregister(SpaceObject) - Method in class spacewar.Registry
update(Graphics) - Method in class spacewar.Display

W

waitForABit() - Method in class spacewar.EnergyPacketProducer

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