Package it.polimi.ingsw.Client.CLI
Class PlayerBoardUI
java.lang.Object
it.polimi.ingsw.Client.CLI.PlayerBoardUI
PlayerBoardUI allows to print all the information representing the 
It exposes multiple methods to render the individual components independently and one method to combine them all in a single component.
PlayerBoard.
 It exposes multiple methods to render the individual components independently and one method to combine them all in a single component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringdrawDiningRoomRow(PawnColour rowColour, PlayerBoard p, GameMode gameMode) It draws a dining room's row with its related students and the not yet obtained coinsstatic StringdrawEntrance(PlayerBoard pb, Model gb) It draws a representation of the entrance of the provided player.static StringdrawPlayerBoard(PlayerBoard playerBoard, Model ctx) It draws a representation of thePlayerBoardof the provided player.static StringdrawTeacher(PawnColour teacher, PlayerBoard p, Model gb) A single teacher will be represented with the standard UI representation of the pawn piece or an empty space if the player has not conquered that specific teacher yet.static StringdrawTowers(PlayerBoard p, Model gb) It draws a representation of the tower storage of the provided player.
- 
Constructor Details- 
PlayerBoardUIpublic PlayerBoardUI()
 
- 
- 
Method Details- 
drawPlayerBoardIt draws a representation of thePlayerBoardof the provided player.- Parameters:
- playerBoard- the- PlayerBoardwhich will be represented
- ctx- reference to the model used to check the available coins left in the game
- Returns:
- the complete player board UI component
 
- 
drawEntranceIt draws a representation of the entrance of the provided player.- Parameters:
- pb- the- PlayerBoardto which the entrance should be associated with
- gb- reference to the model used to add padding in the entrance when 2 or 4 players are in the game because they have less students in the entrance than 3 players' game
- Returns:
- the unused students in a multiline dual column layout String representation
 
- 
drawTowersIt draws a representation of the tower storage of the provided player.- Parameters:
- p- the- PlayerBoardto which the towers should be associated with
- gb- reference to the model used to check the relationship between towers and player
- Returns:
- the unused towers in a multiline dual column layout String representation
 
- 
drawDiningRoomRowIt draws a dining room's row with its related students and the not yet obtained coins- Parameters:
- rowColour- the dining room's row which should be printed
- p- the- PlayerBoardto which the dining room should be associated with
- gameMode- reference to the model used to add coin representation if in correct settings
- Returns:
- a fixed length line containing all the students on the specific dining room's row
 
- 
drawTeacherA single teacher will be represented with the standard UI representation of the pawn piece or an empty space if the player has not conquered that specific teacher yet.- Parameters:
- teacher- the specific- PawnColourof the teacher to be represented
- p- the- PlayerBoardto which the teacher should be associated with
- gb- reference to the model used to check the relationship between teacher and player
- Returns:
- single line containing teacher
 
 
-