Class ObjectCard

java.lang.Object
it.polimi.ingsw.Server.Model.ObjectCard
All Implemented Interfaces:
ObjectCardInterface, Remote

public class ObjectCard extends Object implements ObjectCardInterface
This class represents all the ObjectCards' definition methods
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    Card's image indicated using an Integer attribute (1-3)
    private static final int
     
    static final int
    Maximum amount of cards that can be extracted, used for validation in Board reset methods LIMIT = Number of Object Cards Types (detected dynamically), multiplied for 22 (based on rulebook, total number of cards for type)
    Card's type
    private static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ObjectCard's constructor, used only for testing
    ObjectCard's constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    This method returns Object Card's image
    This method return objectcard's type

    Methods inherited from class java.lang.Object

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

    • LIMIT

      public static final int LIMIT
      Maximum amount of cards that can be extracted, used for validation in Board reset methods LIMIT = Number of Object Cards Types (detected dynamically), multiplied for 22 (based on rulebook, total number of cards for type)
    • TYPESLIMIT

      private static final int TYPESLIMIT
      See Also:
    • IMAGESLIMIT

      private static final int IMAGESLIMIT
      See Also:
    • type

      @Expose private ObjectCardType type
      Card's type
    • image

      @Expose private int image
      Card's image indicated using an Integer attribute (1-3)
  • Constructor Details

    • ObjectCard

      ObjectCard(List<ObjectCard> list) throws Exception
      ObjectCard's constructor
      Parameters:
      list - (1st parameter) List that contains all the objectcards used in the game
      Throws:
      Exception
    • ObjectCard

      ObjectCard(ObjectCardType type) throws RemoteException
      ObjectCard's constructor, used only for testing
      Parameters:
      type - type of the new instance of ObjectCard
      Throws:
      RemoteException
  • Method Details

    • getType

      public ObjectCardType getType()
      This method return objectcard's type
      Returns:
      type card's type
    • getImage

      public int getImage()
      This method returns Object Card's image
      Returns:
      int image