Package battleship.view
Class BattleshipView
java.lang.Object
battleship.view.BattleshipView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClearing console (don't work in IDE)intintvoidPrint help menu.static voidPrint the main menustatic voidprintModeMenu(String mode) Print the Mode choosing menuvoidprintOcean(String additionalInfo) Print ocean view to consolevoidrecoverShips(List<Point> points) Recover ships cell viewsupdateOcean(AttackReport report) Update ocean view after the last attack
-
Constructor Details
-
BattleshipView
public BattleshipView(int sizeHorizontal, int sizeVertical)
-
-
Method Details
-
getHorizontalSize
public int getHorizontalSize()- Returns:
- horizontal size of the ocean.
-
getVerticalSize
public int getVerticalSize()- Returns:
- vertical size of the ocean.
-
printOcean
Print ocean view to console- Parameters:
additionalInfo- additional info to display in the end
-
updateOcean
Update ocean view after the last attack- Parameters:
report- report of attack- Returns:
- String
-
printMainMenu
public static void printMainMenu()Print the main menu -
printModeMenu
Print the Mode choosing menu- Parameters:
mode- mode to chose
-
clearConsole
public static void clearConsole()Clearing console (don't work in IDE) -
printHelp
public void printHelp()Print help menu. -
recoverShips
Recover ships cell views- Parameters:
points- list of points to recover
-