java.lang.Object
it.polimi.ingsw.am13.client.view.tui.ViewTUIPrintUtils
Class containing various utility methods used by view TUI to print elements on the terminal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Static class containing all the symbols related to a card side -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailableStr
(int index) cardToStr
(CardSidePlayableIF cardSidePlayableIF) createCounterLines
(Map<Resource, Integer> resourcesInField) Creates the 7 lines that can be used as counter in TUI.static String
genFieldString
(FieldState field) Generate the field stringstatic String
objectiveCards
(CardObjectiveIF obj1, CardObjectiveIF obj2) Create the string associated to the two objective cards the player can choose fromstatic void
printStartup
(boolean isSocket, String ip, int port) private static void
putCardStrInFieldStr
(Character[][] fieldMatrix, List<List<Character>> strCard, int curX, int curY) static String
starterCards
(CardPlayableIF cardStarter)
-
Constructor Details
-
ViewTUIPrintUtils
public ViewTUIPrintUtils()
-
-
Method Details
-
createCounterLines
Creates the 7 lines that can be used as counter in TUI. There is 1 line per resource, and the symbols used are the same ones printed on the field- Parameters:
resourcesInField
- Count of resources currently on the field- Returns:
- List of size 7 of string lines for the counter. Each line is long 6 chars
-
printStartup
-
starterCards
-
createInfoForObjective
-
objectiveCards
Create the string associated to the two objective cards the player can choose from- Parameters:
obj1
- first objective cardobj2
- second objective card- Returns:
- the string associated to those objective cards
-
genFieldString
Generate the field string- Parameters:
field
- of a player- Returns:
- the string representing the field
-
cardToStr
-
availableStr
-
putCardStrInFieldStr
-