Interface IShip
public interface IShip
The interface Ship.
-
Method Summary
Modifier and TypeMethodDescriptionGets positions.Gets bearing.intGets bottom most pos.Gets category.intGets left most pos.Gets position.Gets positions.intGets right most pos.getSize()Gets size.intGets top most pos.booleanOccupies boolean.voidShoot.voidsink()Sink.booleanStill floating boolean.booleantooCloseTo(IPosition pos) Too close to boolean.booleantooCloseTo(IShip other) Too close to boolean.
-
Method Details
-
getCategory
-
getSize
-
getPositions
-
getAdjacentPositions
-
getPosition
-
getBearing
-
stillFloating
boolean stillFloating()Still floating boolean.- Returns:
- the boolean
-
getTopMostPos
int getTopMostPos()Gets top most pos.- Returns:
- the top most pos
-
getBottomMostPos
int getBottomMostPos()Gets bottom most pos.- Returns:
- the bottom most pos
-
getLeftMostPos
int getLeftMostPos()Gets left most pos.- Returns:
- the left most pos
-
getRightMostPos
int getRightMostPos()Gets right most pos.- Returns:
- the right most pos
-
occupies
-
tooCloseTo
Too close to boolean.- Parameters:
other- the other- Returns:
- the boolean
-
tooCloseTo
Too close to boolean.- Parameters:
pos- the pos- Returns:
- the boolean
-
shoot
-
sink
void sink()Sink.
-