Package battleship.view
Class BattleshipView
java.lang.Object
battleship.view.BattleshipView
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Clearing console (don't work in IDE)int
int
void
Print help menu.static void
Print the main menustatic void
printModeMenu
(String mode) Print the Mode choosing menuvoid
printOcean
(String additionalInfo) Print ocean view to consolevoid
recoverShips
(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
-