Class DevelopCardConstructor

java.lang.Object
it.polimi.ingsw.view.cli.drawer.DevelopCardConstructor

public class DevelopCardConstructor
extends java.lang.Object
Class that builds and fills the Cli representation of a DevelopCard
  • Constructor Summary

    Constructors
    Constructor Description
    DevelopCardConstructor()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String[][] constructDevelopFromId​(int id)
    Build a Cli representation of the DevelopCard associated to the id passed as parameter
    static DevelopCard getDevelopCardFromId​(int cardId)
    Returns the DevelopCard associated to the @cardId passed as parameter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DevelopCardConstructor

      public DevelopCardConstructor()
  • Method Details

    • constructDevelopFromId

      public static java.lang.String[][] constructDevelopFromId​(int id)
      Build a Cli representation of the DevelopCard associated to the id passed as parameter
      Parameters:
      id - , Id of the card
      Returns:
      a matrix of String that represent the DevelopCard associated to the id passed as parameter
    • getDevelopCardFromId

      public static DevelopCard getDevelopCardFromId​(int cardId) throws InvalidCardException
      Returns the DevelopCard associated to the @cardId passed as parameter
      Parameters:
      cardId - , Id of the card
      Returns:
      the DevelopCard associated to the @cardId passed as parameter
      Throws:
      InvalidCardException - if the @cardId passed as parameter doesn't exists