Package battleship.view.oceanview
Class OceanView
java.lang.Object
battleship.view.oceanview.OceanView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
get horizontal size of Ocean viewint
get vertical size of Ocean viewShipCellView[][]
print Oceanvoid
recoverShipCellsByPoints
(List<Point> points) restore ships cell views after cancelling the last attacksupdateOceanView
(AttackReport report) update ocean view after last attack
-
Constructor Details
-
OceanView
public OceanView(int sizeHorizontal, int sizeVertical)
-
-
Method Details
-
getOceanView
- Returns:
- OceanView
-
updateOceanView
update ocean view after last attack- Parameters:
report
- report of the last attack- Returns:
- String with additional info
-
printOcean
print Ocean- Returns:
- String
-
getOceanHorizontalLength
public int getOceanHorizontalLength()get horizontal size of Ocean view- Returns:
- int size > 0
-
getOceanVerticalLength
public int getOceanVerticalLength()get vertical size of Ocean view- Returns:
- int size > 0
-
recoverShipCellsByPoints
restore ships cell views after cancelling the last attacks- Parameters:
points
- points to restore
-