Class IslandUI

java.lang.Object
it.polimi.ingsw.Client.CLI.IslandUI

public class IslandUI extends Object
IslandUI allows to print a placeholder containing an IslandGroup representation or an empty row which could be needed if there was previously an IslandGroup on the console which does not exist anymore in the model
  • Constructor Details

    • IslandUI

      public IslandUI()
  • Method Details

    • draw

      public static String draw(IslandGroup i, Model ctx)
      The IslandGroup will be represented with its ID value and the students and towers on it.
      The students will be ordered by frequency on the island to better highlight the influence.
      Mother Nature is represented by an asterisk
      The number of tower is shown via a number
      Parameters:
      i - the subject to be represented
      ctx - reference to the model used to identify the presence of the mother nature piece on the island group
      Returns:
      the representation of an island group.
    • drawEmptyRow

      public static String drawEmptyRow(Model ctx)
      It basically provides the same result as draw(IslandGroup, Model) but it replaces all characters with whitespaces (except tabulations)
      Parameters:
      ctx - reference to the model used to identify the island group containing the most students
      Returns:
      an all whitespace's filled String, long enough to fill the IslandUIs' composition