A B C D E F G H I K L M O P R S T U W X Y Z

A

actionPerformed(ActionEvent) - Method in class SpaceInvaders.SpaceInvaders
Handles game start button functions including starting game audio clip.
Alien - class SpaceInvaders.Alien.
Encapsulates alien scary attacker functionality.
Alien(Point) - Constructor for class SpaceInvaders.Alien
Accepts alien screen position.
alienCount - Variable in class SpaceInvaders.SpaceInvaders
aliens remaining
alienHitsShip(Alien, Ship) - Method in class SpaceInvaders.SpaceInvaders
Determines if an alien collided with the spaceship.
alienImage - Variable in class SpaceInvaders.SpaceInvaders
alien image style array
appInit - Variable in class SpaceInvaders.SpaceInvaders
applet initialization flag

B

BEGINNER - Variable in class SpaceInvaders.SpaceInvaders
beginner game speed

C

c - Variable in class SpaceInvaders.Pixel
RGB color value
clearScreen - Variable in class SpaceInvaders.SpaceInvaders
screen clearing flag
COLS - Variable in class SpaceInvaders.SpaceInvaders
number of columns in alien force

D

diffChoices - Variable in class SpaceInvaders.SpaceInvaders
game difficulty choice menu
draw(Graphics) - Method in class SpaceInvaders.Star
Draws the star on the screen.
draw(Graphics) - Method in class SpaceInvaders.Score
Draws the score on the screen.
draw(Graphics) - Method in class SpaceInvaders.Laser
Draws the laser on the screen if the erase flag is not set.
draw(Graphics) - Method in class SpaceInvaders.Alien
Overwrites the previous move and leaves the actual alien image handling and drawing to the applet's paint method.
draw(Graphics) - Method in class SpaceInvaders.Ship
Overwrites the previous move and leaves the actual spaceship image handling and drawing to the applet's paint method.

E

EXPERT - Variable in class SpaceInvaders.SpaceInvaders
expert game speed

F

firstMove - Static variable in class SpaceInvaders.Alien
Alien flock's first move flag

G

gameAudio - Variable in class SpaceInvaders.SpaceInvaders
game background music
gameOver - Variable in class SpaceInvaders.SpaceInvaders
game over flag
gameScore - Variable in class SpaceInvaders.SpaceInvaders
current game score
getAppletInfo() - Method in class SpaceInvaders.SpaceInvaders
Returns information about this applet.
getColor() - Method in class SpaceInvaders.Pixel
Gets the color.
getColor() - Method in class SpaceInvaders.Laser
Gets laser color.
getHeight() - Static method in class SpaceInvaders.Alien
Gets alien height.
getHeight() - Static method in class SpaceInvaders.Ship
Gets the height of a spaceship image.
getImage() - Method in class SpaceInvaders.Alien
Gets image index and advances the index to the next one.
getParameterInfo() - Method in class SpaceInvaders.SpaceInvaders
Returns information about the parameters that are settable in the HTML file.
getPosition() - Method in class SpaceInvaders.Ship
Gets the screen position.
getSpeed() - Static method in class SpaceInvaders.Alien
Gets alien speed.
getWidth() - Static method in class SpaceInvaders.Alien
Gets alien width.
getWidth() - Static method in class SpaceInvaders.Ship
Gets the width of a spaceship image.
getX() - Method in class SpaceInvaders.Point
Gets the x coordinate.
getX() - Method in class SpaceInvaders.Star
Gets x coordinate.
getX() - Method in class SpaceInvaders.Laser
Gets x coordinate.
getX() - Method in class SpaceInvaders.Alien
Gets x coordinate of screen position.
getY() - Method in class SpaceInvaders.Point
Gets the y coordinate.
getY() - Method in class SpaceInvaders.Star
Gets y coordinate.
getY() - Method in class SpaceInvaders.Laser
Gets y coordinate.
getY() - Method in class SpaceInvaders.Alien
Gets y coordinate of screen position.

H

height - Static variable in class SpaceInvaders.Alien
height of Alien image
height - Static variable in class SpaceInvaders.Ship
spaceship image height in pixels
height - Variable in class SpaceInvaders.SpaceInvaders
applet height
hitAudio - Variable in class SpaceInvaders.SpaceInvaders
laser hitting alien sound

I

image - Variable in class SpaceInvaders.Alien
index of image to display
increment() - Method in class SpaceInvaders.Score
Increments the score by 1, the default increment.
increment(int) - Method in class SpaceInvaders.Score
Increments the score by a specified amount.
init() - Static method in class SpaceInvaders.Alien
Initialize the Alien attack pattern reference point to (0,40) and set flag to march right.
init() - Method in class SpaceInvaders.SpaceInvaders
Initialize the game: Set black background with stars randomly distributed, load game sounds and spaceship and alien images, initialize game object locations as they will appear on screen.
INTERMEDIATE - Variable in class SpaceInvaders.SpaceInvaders
intermediate game speed
itemStateChanged(ItemEvent) - Method in class SpaceInvaders.SpaceInvaders
Handles menu selections for game difficulty and spaceship style.

K

keyPressed(KeyEvent) - Method in class SpaceInvaders.SpaceInvaders
Handles a space bar press as an attempt to shoot a laser and shoots a laser only if fewer than the maximum number allowed are on screen; play shooting sound if shot was made.
keyReleased(KeyEvent) - Method in class SpaceInvaders.SpaceInvaders
not used
keyTyped(KeyEvent) - Method in class SpaceInvaders.SpaceInvaders
not used

L

Laser - class SpaceInvaders.Laser.
Encapsulates laser shooting functionality.
Laser(Pixel) - Constructor for class SpaceInvaders.Laser
Initializes laser's position and color.
Laser(Point, Color) - Constructor for class SpaceInvaders.Laser
Initializes Laser color and position on screen.
laserHitsAlien(Laser, Alien) - Method in class SpaceInvaders.SpaceInvaders
Determines if a laser has hit an alien.
LASERS - Variable in class SpaceInvaders.SpaceInvaders
maximum number of lasers allowed to fly
laserShoot - Variable in class SpaceInvaders.SpaceInvaders
laser shooting swoosh

M

marchRight - Static variable in class SpaceInvaders.Alien
keeps track of Alien flock's move direction
modShipImage - Variable in class SpaceInvaders.SpaceInvaders
modern spaceship image
move() - Method in class SpaceInvaders.Star
Advances star straight downward 1 pixel per move, restarting the screen position to the top of the screen when the star moves off the bottom of the screen.
move() - Method in class SpaceInvaders.Laser
Advances this laser straight upward and flags an off-screen move as "erasure after next paint".
move() - Static method in class SpaceInvaders.Alien
Advance the Alien flock's x and y reference coordinates one move.
move(boolean) - Method in class SpaceInvaders.Ship
Moves spaceship either right or left.
moveCount - Static variable in class SpaceInvaders.Alien
count used to slow down aliens' legs movements
moveSpeed - Static variable in class SpaceInvaders.Alien
player-selected speed
myAliens - Variable in class SpaceInvaders.SpaceInvaders
alien array
myShip - Variable in class SpaceInvaders.SpaceInvaders
the spaceship

O

oldScore - Variable in class SpaceInvaders.Score
the previous game score

P

paint(Graphics) - Method in class SpaceInvaders.SpaceInvaders
Paint all game objects and manage the moving of aliens and lasers.
Pixel - class SpaceInvaders.Pixel.
Extends the Point class to add color to the basic x,y capabilities of Point.
Pixel() - Constructor for class SpaceInvaders.Pixel
Default constructor sets color to white.
Pixel(int, int, Color) - Constructor for class SpaceInvaders.Pixel
Accepts x,y coordinates and a color value.
Pixel(Pixel) - Constructor for class SpaceInvaders.Pixel
Copy constructor.
Pixel(Point, Color) - Constructor for class SpaceInvaders.Pixel
This constructor accepts a Point and a Color.
playGame - Variable in class SpaceInvaders.SpaceInvaders
proceed with game flag
Point - class SpaceInvaders.Point.
Maintains an (x, y) coordinate pair.
Point() - Constructor for class SpaceInvaders.Point
Default constructor initializes each instance variable to zero.
Point(int, int) - Constructor for class SpaceInvaders.Point
Accepts x and y coordinates.
Point(Point) - Constructor for class SpaceInvaders.Point
Copy constructor.
prevPos - Variable in class SpaceInvaders.Star
previous screen position
prevPos - Variable in class SpaceInvaders.Laser
previous screen position before this move
prevPos - Variable in class SpaceInvaders.Ship
previous position of spaceship

R

ROWS - Variable in class SpaceInvaders.SpaceInvaders
number of rows in alien force
run() - Method in class SpaceInvaders.SpaceInvaders
Controls game speed by sleeping, then repainting when needed.

S

Score - class SpaceInvaders.Score.
Maintains and displays the game score.
SCORE_POSITION - Variable in class SpaceInvaders.SpaceInvaders
position of score on screen
Score() - Constructor for class SpaceInvaders.Score
Default constructor initializes score to zero and sets the screen position of score display to (10, 10).
Score(int, Point) - Constructor for class SpaceInvaders.Score
Accepts score and screen position.
screenPos - Variable in class SpaceInvaders.Score
screen position of score display
screenPos - Variable in class SpaceInvaders.Ship
position of spaceship on the screen
selShipImage - Variable in class SpaceInvaders.SpaceInvaders
spaceship image selection
setColor(Color) - Method in class SpaceInvaders.Pixel
Sets the color.
setErase() - Method in class SpaceInvaders.Laser
Sets flag to destroy laser after next paint.
setErase() - Method in class SpaceInvaders.Alien
Sets flag to destroy alien.
setGame - Variable in class SpaceInvaders.SpaceInvaders
first game setup flag
setHeight(int) - Static method in class SpaceInvaders.Alien
Sets alien height.
setHeight(int) - Static method in class SpaceInvaders.Ship
Sets the height of a spaceship image.
setPosition(Point) - Method in class SpaceInvaders.Ship
Sets the screen position of this spaceship image.
setSpeed(int) - Static method in class SpaceInvaders.Alien
Sets alien speed.
setWidth(int) - Static method in class SpaceInvaders.Alien
Sets alien width.
setWidth(int) - Static method in class SpaceInvaders.Ship
Sets the width of a spaceship image.
setX(int) - Method in class SpaceInvaders.Point
Sets the x coordinate.
setXY(int, int) - Method in class SpaceInvaders.Point
Sets the x and y coordinates.
setY(int) - Method in class SpaceInvaders.Point
Sets the y coordinate.
Ship - class SpaceInvaders.Ship.
Encapsulates the spaceship functionality.
Ship() - Constructor for class SpaceInvaders.Ship
Default constructor initializing spaceship's image position to (300, 430).
Ship(Point) - Constructor for class SpaceInvaders.Ship
Accepts screen coordinates for spaceship's image position.
shipChoices - Variable in class SpaceInvaders.SpaceInvaders
spaceship choice menu
shipHitAudio - Variable in class SpaceInvaders.SpaceInvaders
alien hitting ship sound
shipImage - Variable in class SpaceInvaders.SpaceInvaders
current spaceship image
shoot() - Method in class SpaceInvaders.Ship
Shoots a yellow laser from top of spaceship.
SpaceInvaders - package SpaceInvaders
 
SpaceInvaders - class SpaceInvaders.SpaceInvaders.
An applet simulating the popular Space Invaders video game.
SpaceInvaders() - Constructor for class SpaceInvaders.SpaceInvaders
 
Star - class SpaceInvaders.Star.
Encapsulates star behavior.
Star(Point, Color) - Constructor for class SpaceInvaders.Star
Accepts a star's screen position and color.
stars - Variable in class SpaceInvaders.SpaceInvaders
array of colored stars
start() - Method in class SpaceInvaders.SpaceInvaders
Restarts game music after minimization/maximization sequence if the music had been playing, then start game motion thread.
startButton - Variable in class SpaceInvaders.SpaceInvaders
start game button
stdShipImage - Variable in class SpaceInvaders.SpaceInvaders
standard spaceship image
stop() - Method in class SpaceInvaders.SpaceInvaders
Stops Space Invaders game including all audio clips.

T

theScore - Variable in class SpaceInvaders.Score
the current game's score
timer - Variable in class SpaceInvaders.SpaceInvaders
thread that controls game speed
toErase - Variable in class SpaceInvaders.Laser
flag set to mark this laser's final display before destruction
toErase - Variable in class SpaceInvaders.Alien
flag set to erase this alien after next screen paint
toErase() - Method in class SpaceInvaders.Laser
Gets "destroy laser" flag.
toErase() - Method in class SpaceInvaders.Alien
Gets "destroy alien" flag.

U

update(Graphics) - Method in class SpaceInvaders.SpaceInvaders
Overrides update to eliminate clearing of the graphics context before each screen paint in order to avoid annoying flicker and clears the screen when a flag is set.

W

width - Static variable in class SpaceInvaders.Alien
width of Alien image
width - Static variable in class SpaceInvaders.Ship
spaceship image width in pixels
width - Variable in class SpaceInvaders.SpaceInvaders
applet width

X

x - Variable in class SpaceInvaders.Point
the x coordinate
x - Variable in class SpaceInvaders.Alien
x displacement of this alien from flock's x0 reference
x0 - Static variable in class SpaceInvaders.Alien
flock x reference coordinate
xPrev - Variable in class SpaceInvaders.Alien
x coordinate of previous move

Y

y - Variable in class SpaceInvaders.Point
the y coordinate
y - Variable in class SpaceInvaders.Alien
y displacement of this alien from flock's y0 reference
y0 - Static variable in class SpaceInvaders.Alien
flock y reference coordinate
youLose - Variable in class SpaceInvaders.SpaceInvaders
lose game flag
youWinAudio - Variable in class SpaceInvaders.SpaceInvaders
victory gong
yPrev - Variable in class SpaceInvaders.Alien
y coordinate of previous move

Z

zappers - Variable in class SpaceInvaders.SpaceInvaders
laser array

A B C D E F G H I K L M O P R S T U W X Y Z