A B C D F G H I L M N O P R S T U V W X Y

A

active - Variable in class Ship
 
aiAttack(Grid) - Method in class Player
Used to incorporate the Artifical Intelligence attack, basically the brain behind the operation
aircraft - Variable in class BattleS
 

B

BattleBut - Variable in class BattleS
 
BattleS - Class in <Unnamed>
 
BattleS() - Constructor for class BattleS
 
BattleS.HealthBox - Class in <Unnamed>
The healthbox is used to display the headpoints your ships have left before they are sunk
BattleS.HealthBox() - Constructor for class BattleS.HealthBox
The construction for the healthbox class to setup the frame
BattleS.ImagePanel - Class in <Unnamed>
The ImagePanel class is used to draw images to a panel by passing a image
BattleS.ImagePanel(Image) - Constructor for class BattleS.ImagePanel
The construction for the ImagePanel class where it gets passed in an image and paints that to a panel
BattleS.PlayImage - Class in <Unnamed>
The PlayImage class is used to create the animation you see throughout the game play
BattleS.PlayImage(int) - Constructor for class BattleS.PlayImage
The construction for the PlayImage class, sets which animation the object will create
BattleS.SocketThrdServer - Class in <Unnamed>
The SocketThrdServer Class, this class is used to create the server object that runs in a thread and continually listens for input from clients taken from the AppletCliSer.java and modified to work with battle ship
BattleS.SocketThrdServer() - Constructor for class BattleS.SocketThrdServer
The construction for the SocketThrdServer to setup the port and server variables
BattleS.TurnBox - Class in <Unnamed>
The class that is used to create the turn box which displays the number of turns you and your opponent have taken
BattleS.TurnBox() - Constructor for class BattleS.TurnBox
The construction for the TurnBox class, sets up the actual frame for display
BattleS.UseSocket - Class in <Unnamed>
The construction for the Client - UseSocket class that uses a thread to lsiten for input connections Also taken from the AppletCliSer.java exmaple and modified for the battleship game
BattleS.UseSocket() - Constructor for class BattleS.UseSocket
 
battleship - Variable in class BattleS
 
Battleship1 - Variable in class Player
 
Battleship2 - Variable in class Player
 
BattleShipHP - Variable in class BattleS.HealthBox
 
battleshipImages - Variable in class BattleS
 
BattleSunk - Variable in class BattleS
 
BattleSunk2 - Variable in class BattleS
 
bottomX - Variable in class Turn
 
bottomY - Variable in class Turn
 
btclose - Variable in class BattleS.HealthBox
 
btclose - Variable in class BattleS.TurnBox
 
buticon - Variable in class BattleS
 
butspot - Variable in class BattleS
 
butspot1 - Variable in class BattleS
 
bypass - Variable in class BattleS
 
byPass(int) - Method in class BattleS
Sets the bypass mode up to skip computer shot

C

Carrier1 - Variable in class Player
 
Carrier2 - Variable in class Player
 
CarrierBut - Variable in class BattleS
 
CarrierHP - Variable in class BattleS.HealthBox
 
carrierImages - Variable in class BattleS
 
CarrierSunk - Variable in class BattleS
 
CarrierSunk2 - Variable in class BattleS
 
CButton - Class in <Unnamed>
 
CButton(int, int) - Constructor for class CButton
The CButton class is used to extend the buttons in the grid oh buttons to allow for extra properties
checkCord(int, int, int, int) - Method in class Grid
Used to check a to see if a ship goes off the grid
checkspot(int, int) - Method in class Grid
Used to check to see if the selected space has been already hit or miss
clapArray - Variable in class BattleS
 
col - Variable in class Space
 
CompGrid - Variable in class BattleS
 
counter - Variable in class BattleS
 
counter - Variable in class Turn
 
currentImageIndex - Variable in class BattleS.PlayImage
 

D

destroyer - Variable in class BattleS
 
Destroyer1 - Variable in class Player
 
Destroyer2 - Variable in class Player
 
DestroyerBut - Variable in class BattleS
 
DestroyerHP - Variable in class BattleS.HealthBox
 
destroyerImages - Variable in class BattleS
 
DestroyerSunk - Variable in class BattleS
 
DestroyerSunk2 - Variable in class BattleS
 
direction - Variable in class Turn
 

F

finalize() - Method in class BattleS.SocketThrdServer
 

G

gameExit() - Method in class BattleS
This function exits the game when its called.
GameOver - Variable in class BattleS
 
GameOver(int) - Method in class Player
Used to determine when the game is over or not
gameQuit - Variable in class BattleS
 
gameReplay() - Method in class BattleS
This resets the values in the game so the game can be played over again
gametype - Variable in class BattleS
 
getActive() - Method in class Ship
Used to get the state of any ship
getBottomX() - Method in class Turn
Used to get the bottom of the x
getBottomY() - Method in class Turn
Used to get the bottom y
getbyPass() - Method in class BattleS
Gets the bypass mode status
getCol() - Method in class Space
Gets the coumn number for this spot
getCount() - Method in class Turn
Used to get the count
getCounter() - Method in class BattleS
Gets the counter number
getDirection() - Method in class Turn
Used to get the direction for the AIattack
getGX() - Method in class Grid
Used to get the row coordinate for the grid buttons for when the AI shoots
getGY() - Method in class Grid
Used to get the col coordinate for the grid buttons for when the AI shoots
getLeftX() - Method in class Turn
Used to get the left of the x
getLeftY() - Method in class Turn
Used to get the left of the y
getMode() - Method in class Player
Used to get the attack mode of the AI
getOX() - Method in class Turn
Used to get the orignal x
getOY() - Method in class Turn
Used to get the orignal y
getRadio() - Method in class BattleS
Gets the radio buttons attribute
getRightX() - Method in class Turn
Used to get the right of the x
getRightY() - Method in class Turn
Used to get the right of the y
getRow() - Method in class Space
gets the row number for this spot
getShip() - Method in class BattleS
gets the ship type
getShip() - Method in class Space
Gets the ship symbol for that spot
getShipHp(int) - Method in class Player
used to return the HP of the ship determined by the type of ship passed in
getShipHP() - Method in class Ship
Used to get the current head points of the ship requested
getShipLength() - Method in class Ship
Used to get the ship length of the ship requested
getShipName() - Method in class Ship
Used to get the name of the ship
getShipSize() - Method in class BattleS
Gets the ship size of the ship stored in temp memory
getStatus() - Method in class Space
Returns the status of a spot on the grid
getTopX() - Method in class Turn
Used to get the top x
getTopY() - Method in class Turn
Used to get the top y
getTurnCounter() - Method in class BattleS
gets the turn count for each player
getX() - Method in class CButton
Used to get the row coordinate of the button
getY() - Method in class CButton
Used to get the column coordinate of the button
Grid - Class in <Unnamed>
 
Grid(int, int, int) - Constructor for class Grid
The Grid class is where the grid matrix is created for the grid classes
grid - Variable in class Grid
 
gtype - Variable in class BattleS
 
gui() - Method in class BattleS
Used to create the Graphics User Interface devised of numerous objects pretaining to ships
guiSetupShips(Grid, int, int, int, int, int) - Method in class Player
Used to setup the ships for the gui front end
guix - Variable in class Grid
 
guiy - Variable in class Grid
 

H

healthbox - Variable in class BattleS
 
HealthTitle - Variable in class BattleS.HealthBox
 
height - Variable in class Grid
 
historyp - Variable in class BattleS
 
hit - Variable in class BattleS
 
hit - Variable in class Player
 
horizontalButton - Variable in class BattleS
 
hp - Variable in class Ship
 
hpLoss() - Method in class Ship
Used to subtract headpoints for a given ship

I

imageArray - Variable in class BattleS
 
imageDraw - Variable in class BattleS.ImagePanel
 
imagePanel - Variable in class BattleS
 
imageToDisplay - Variable in class BattleS
 
in - Variable in class BattleS
 
in2 - Variable in class BattleS
 
init() - Method in class BattleS
The start of the applet where the gui is called and is defined
isAlive - Variable in class BattleS
 
isServer - Variable in class BattleS
 

L

LastTurn - Variable in class BattleS
 
LastTurn1 - Variable in class BattleS
 
LastTurn1a - Variable in class BattleS
 
LastTurna - Variable in class BattleS
 
leftX - Variable in class Turn
 
leftY - Variable in class Turn
 
length - Variable in class Grid
 
LetterNum(int) - Method in class Grid
Used to convert coordinates to letters
lose - Variable in class BattleS
 
loseArray - Variable in class BattleS
 
losePanel - Variable in class BattleS
 
LPanel - Variable in class BattleS
 
LPanel2 - Variable in class BattleS
 

M

menu - Variable in class BattleS
 
missed - Variable in class BattleS
 
mode - Variable in class Player
 
msg - Variable in class BattleS.UseSocket
 

N

netX - Variable in class BattleS
 
netY - Variable in class BattleS
 
numPanel - Variable in class BattleS
 
numPanel2 - Variable in class BattleS
 

O

Opp - Variable in class BattleS
 
OppTurn - Variable in class BattleS.TurnBox
 
opready1 - Variable in class BattleS
 
opready2 - Variable in class BattleS
 
opshiploc - Variable in class BattleS
 
opsunkaircraft - Variable in class BattleS
 
opsunkbattle - Variable in class BattleS
 
opsunkdestroyer - Variable in class BattleS
 
opsunkpatrol - Variable in class BattleS
 
opsunksub - Variable in class BattleS
 
otherClasstest - Variable in class BattleS
 
out - Variable in class BattleS
 
out2 - Variable in class BattleS
 
oX - Variable in class Turn
 
oY - Variable in class Turn
 

P

p1 - Variable in class BattleS
 
P1 - Variable in class BattleS.TurnBox
 
p2 - Variable in class BattleS
 
P2 - Variable in class BattleS.TurnBox
 
paintComponent(Graphics) - Method in class BattleS.ImagePanel
This method is overriden to draw the image and scale the graphics accordingly
paintComponent(Graphics) - Method in class BattleS.PlayImage
 
panel - Variable in class BattleS
 
patrolboat - Variable in class BattleS
 
PatrolBut - Variable in class BattleS
 
PatrolHP - Variable in class BattleS.HealthBox
 
PatrolSunk - Variable in class BattleS
 
PatrolSunk2 - Variable in class BattleS
 
Play1 - Variable in class BattleS
 
play1lose - Variable in class BattleS
 
play1win - Variable in class BattleS
 
Play2 - Variable in class BattleS
 
play2lose - Variable in class BattleS
 
play2win - Variable in class BattleS
 
Player - Class in <Unnamed>
 
Player(int, Grid) - Constructor for class Player
The Player class is sued to setup the ships for each player,also is sued to shoot and attack other players ships and as well is used to detract the ships health
Player1 - Variable in class BattleS
 
Player2 - Variable in class BattleS
 
PlayerOne - Variable in class BattleS
 
port - Variable in class BattleS
 
port - Variable in class BattleS.SocketThrdServer
 
printFullGrid() - Method in class Grid
Used to print out a full battleship grid displaying ships for one player
printGrid(int, int) - Method in class Grid
Used to print the grids to display where ships are on the grid buttons
PTBoat1 - Variable in class Player
 
PTBoat2 - Variable in class Player
 
ptboatImages - Variable in class BattleS
 

R

rad - Variable in class BattleS
 
ready1 - Variable in class BattleS
 
ready2 - Variable in class BattleS
 
registering - Variable in class BattleS
 
replay - Variable in class BattleS
 
ret2 - Variable in class BattleS
 
rightX - Variable in class Turn
 
rightY - Variable in class Turn
 
rolloverbut - Variable in class BattleS
 
row - Variable in class Space
 
run() - Method in class BattleS.PlayImage
 
run() - Method in class BattleS.SocketThrdServer
 
run() - Method in class BattleS.UseSocket
 

S

server - Variable in class BattleS.SocketThrdServer
 
serverName - Variable in class BattleS.UseSocket
 
serverSocket - Variable in class BattleS
 
setActive(int) - Method in class Ship
used to set the active of a ship
setBottomX(int) - Method in class Turn
Used to set the BottomX spot
setBottomY(int) - Method in class Turn
Used to set the BottomY spot
setCol(int) - Method in class Space
Sets the column number for this spot
setCount(int) - Method in class Turn
Used to set the count
setCounter(int) - Method in class BattleS
Sets the counter
setDirection(String) - Method in class Turn
Used to set the direction
setGX(int) - Method in class Grid
Used to set up the row coordinate for the grid buttons for when the AI shoots
setGY(int) - Method in class Grid
Used to set up the col coordinate for the grid buttons for when the AI shoots
setLeftX(int) - Method in class Turn
Used to set the LeftX spot
setLeftY(int) - Method in class Turn
Used to set the Lefty spot
setMode(int) - Method in class Player
Used to set the attack mode of the AI
setOX(int) - Method in class Turn
Used to set the orignal spot at x
setOY(int) - Method in class Turn
Used to set the orignal spot at y
setRadio(int) - Method in class BattleS
Sets the radio buttons attribute
setRightX(int) - Method in class Turn
Used to set the RightX spot
setRightY(int) - Method in class Turn
Used to set the RightX spot
setRow(int) - Method in class Space
sets the row number for that spot
setShip(int) - Method in class BattleS
Sets the ships type
setShip(String) - Method in class Space
Sets the ship for this spot
setShipSize(int) - Method in class BattleS
Sets the ship size
setStatus(String) - Method in class Space
The space class is used to setup each space on teh grid and holds attributes such as what ship is on that spot, if its been hit, or a miss
setTopX(int) - Method in class Turn
Used to set the TopX spot
setTopY(int) - Method in class Turn
Used to set the TopY spot
setTurnCounter() - Method in class BattleS
Sets the turn counter by incrementing it
setupShips(int, int, int, int, int, int) - Method in class Grid
This sets up the ships on the grid for both players
Ship - Class in <Unnamed>
George Smith CIS421 - Web Based Java December 7th, 2007 Project: Battleship v2.0 Description: The Ship class for the battle ship game that is used to store attributes about each ship
Ship(int) - Constructor for class Ship
The Ship class is used to setup the ship attributes and to store important information about them
ship - Variable in class Space
 
shipArray - Variable in class BattleS
 
shipbut1 - Variable in class BattleS
 
shipCheckH(int, int, int) - Method in class Grid
Used to check to see if a ship comes in conflict with another ship horizontally
shipCheckV(int, int, int) - Method in class Grid
Used to check to see if a ship comes in conflict with another ship vertically
shipHit(int, int) - Method in class Grid
Used to get the ship that was hit
shipID(String) - Method in class Player
Used to ID the ship that was hit and to deduct its headpoints
shipID2(String) - Method in class Player
Used to ID the ship that was hit and to deduct its headpoints
shipLayout - Variable in class BattleS.HealthBox
 
shipLength - Variable in class Ship
 
shiploc - Variable in class BattleS
 
shipName - Variable in class Ship
 
shipSym - Variable in class Ship
 
shipT - Variable in class BattleS
 
shoot(int, int) - Method in class Grid
Used to check to see if a ship is at a point being shot at
shootShips(int, Grid, int, int, int, int) - Method in class Player
Used to fire at ships from variables being passed from the main game class
showShip(int) - Method in class Player
Used to show the ship status of the computers ships
showShip2(int) - Method in class Player
Used to show the ship status of the computers ships
size - Variable in class BattleS
 
socket - Variable in class BattleS
 
Space - Class in <Unnamed>
George Smith CIS421 - Web Based Java December 7th, 2007 Project: Battleship v2.0 Description: The Space class for the battle ship game that is used to manage the spaces on the grid
Space(int, int) - Constructor for class Space
Sets up the space class to store grid spot states
start() - Method in class BattleS.PlayImage
 
status - Variable in class Space
 
StatusL - Variable in class BattleS
 
StatusT - Variable in class BattleS
 
stop() - Method in class BattleS.PlayImage
 
SubBut - Variable in class BattleS
 
SubHP - Variable in class BattleS.HealthBox
 
submarine - Variable in class BattleS
 
Submarine1 - Variable in class Player
 
Submarine2 - Variable in class Player
 
submarineImages - Variable in class BattleS
 
SubSunk - Variable in class BattleS
 
SubSunk2 - Variable in class BattleS
 
sunk - Variable in class BattleS
 
sunkshipArray - Variable in class BattleS
 

T

t - Variable in class BattleS.PlayImage
 
tCount - Variable in class BattleS
 
tempButton2 - Variable in class BattleS
 
Title - Variable in class BattleS
 
topX - Variable in class Turn
 
topY - Variable in class Turn
 
toString() - Method in class CButton
Used to return the string form of the coordinates
Turn - Class in <Unnamed>
George Smith CIS421 - Web Based Java December 7th, 2007 Project: Battleship v2.0 Description: The Turn class for the battle ship game is used to store the AI information sued to attack the players ship
Turn() - Constructor for class Turn
 
Turn(int, int) - Constructor for class Turn
The turn class is where the values for the AI are stored and used to attack the other player
turnbox - Variable in class BattleS
 
turnLayout - Variable in class BattleS.TurnBox
 

U

update(Graphics) - Method in class BattleS.PlayImage
 
updateConnected() - Method in class BattleS
 
usunkaircraft - Variable in class BattleS
 
usunkbattle - Variable in class BattleS
 
usunkdestroyer - Variable in class BattleS
 
usunkpatrol - Variable in class BattleS
 
usunksub - Variable in class BattleS
 

V

verticalButton - Variable in class BattleS
 

W

Waiting - Variable in class BattleS
 
whichPlay - Variable in class BattleS.PlayImage
 
win - Variable in class BattleS
 
winPanel - Variable in class BattleS
 
won - Variable in class BattleS
 

X

x - Variable in class CButton
 

Y

y - Variable in class CButton
 
you - Variable in class BattleS
 
YouTurn - Variable in class BattleS.TurnBox
 

A B C D F G H I L M N O P R S T U V W X Y