Class Tasks

java.lang.Object
battleship.Tasks

public class Tasks extends Object
The type Tasks.
  • Constructor Details

    • Tasks

      public Tasks()
  • Method Details

    • buildFleet

      public static Fleet buildFleet(Scanner in)
      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

      public static Ship readShip(Scanner in)
      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

      public static Position readPosition(Scanner in)
      This operation allows reading a position in the map
      Parameters:
      in - The scanner to read from
      Returns:
      The position that has been read
    • readClassicPosition

      public static IPosition readClassicPosition(@NotNull @NotNull Scanner in)
      This operation allows reading a position in the map
      Parameters:
      in - The scanner to read from
      Returns:
      The classic position that has been read