Package it.polimi.ingsw.Client.CLI
Class IslandUI
java.lang.Object
it.polimi.ingsw.Client.CLI.IslandUI
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
draw
(IslandGroup i, Model ctx) TheIslandGroup
will be represented with its ID value and the students and towers on it.static String
drawEmptyRow
(Model ctx) It basically provides the same result asdraw(IslandGroup, Model)
but it replaces all characters with whitespaces (except tabulations)
-
Constructor Details
-
IslandUI
public IslandUI()
-
-
Method Details
-
draw
TheIslandGroup
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 representedctx
- 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
It basically provides the same result asdraw(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
-