Package battleship
Class Tasks
java.lang.Object
battleship.Tasks
The type Tasks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FleetbuildFleet(Scanner in) This operation allows the build up of a fleet, given user datastatic voidmenu()This task also tests the fighting element of a round of three shotsstatic voidmenuHelp()This function provides help information about the menu commands.static IPositionreadClassicPosition(@NotNull Scanner in) This operation allows reading a position in the mapstatic PositionreadPosition(Scanner in) This operation allows reading a position in the mapstatic ShipThis operation reads data about a ship, build it and returns it
-
Constructor Details
-
Tasks
public Tasks()
-
-
Method Details
-
buildFleet
This operation allows the build up of a fleet, given user data- Parameters:
in- The scanner to read from- Returns:
- The fleet that has been built
-
readShip
This operation reads data about a ship, build it and returns it- Parameters:
in- The scanner to read from- Returns:
- The created ship based on the data that has been read
-
readPosition
This operation allows reading a position in the map- Parameters:
in- The scanner to read from- Returns:
- The position that has been read
-
readClassicPosition
This operation allows reading a position in the map- Parameters:
in- The scanner to read from- Returns:
- The classic position that has been read