Package it.polimi.ingsw.view.cli.drawer
Class LeaderConstructor
java.lang.Object
it.polimi.ingsw.view.cli.drawer.LeaderConstructor
public class LeaderConstructor
extends java.lang.Object
Class that builds and fills the Cli representation of a LeaderCard
-
Constructor Summary
Constructors Constructor Description LeaderConstructor() -
Method Summary
Modifier and Type Method Description static java.lang.String[][]constructLeaderFromId(int id)Build a Cli representation of the LeaderCard associated to the id passed as parameterstatic LeaderCardgetLeaderCardFromId(int cardId)Returns the LeaderCard associated to the @cardId passed as parameterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
LeaderConstructor
public LeaderConstructor()
-
-
Method Details
-
constructLeaderFromId
public static java.lang.String[][] constructLeaderFromId(int id)Build a Cli representation of the LeaderCard associated to the id passed as parameter- Parameters:
id- , Id of the card- Returns:
- a matrix of String that represent the LeaderCard associated to the id passed as parameter
-
getLeaderCardFromId
Returns the LeaderCard associated to the @cardId passed as parameter- Parameters:
cardId- , Id of the card- Returns:
- the LeaderCard associated to the @cardId passed as parameter
- Throws:
InvalidCardException- if the @cardId passed as parameter doesn't exists
-