|
||||||||
PREV NEXT | FRAMES NO FRAMES |
BattleshipState
instance with
size 10.
BattleshipState
instance with
given size.
getSize
- return the size of the grid.
hasShip
- return whether or there is a ship
at the given row and column
isGuessed
- return whether or not a given row
or column has been guessed
isWon
- returns whether or not all ship
segment positions have been guessed.
makeGuess
- mark position as guessed and
return whether or not there is a ship segment at that
location.
placeShip
- place a ship at all positions in
the rectangle defined by the corners (rowMin, colMin) and
(rowMax, colMax)
setPlaying
- set whether or not the state is
in "playing" mode, affecting output of toString
toString
- return a String representation of the
current state grid.
|
||||||||
PREV NEXT | FRAMES NO FRAMES |