B G H I M P S T

B

BattleshipState - Class in <Unnamed>
BattleshipState.java Created: Mon Mar 31 08:09:18 2003
BattleshipState() - Constructor for class BattleshipState
Creates a new BattleshipState instance with size 10.
BattleshipState(int) - Constructor for class BattleshipState
Creates a new BattleshipState instance with given size.

G

getSize() - Method in class BattleshipState
getSize - return the size of the grid.

H

hasShip(int, int) - Method in class BattleshipState
hasShip - return whether or there is a ship at the given row and column

I

isGuessed(int, int) - Method in class BattleshipState
isGuessed - return whether or not a given row or column has been guessed
isWon() - Method in class BattleshipState
isWon - returns whether or not all ship segment positions have been guessed.

M

makeGuess(int, int) - Method in class BattleshipState
makeGuess - mark position as guessed and return whether or not there is a ship segment at that location.

P

placeShip(int, int, int, int) - Method in class BattleshipState
placeShip - place a ship at all positions in the rectangle defined by the corners (rowMin, colMin) and (rowMax, colMax)

S

setPlaying(boolean) - Method in class BattleshipState
setPlaying - set whether or not the state is in "playing" mode, affecting output of toString

T

toString() - Method in class BattleshipState
toString - return a String representation of the current state grid.

B G H I M P S T