Coverage Summary for Class: TribeCard (it.polimi.ingsw.gc14.Model.Cards)

Class Class, % Method, % Line, %
TribeCard 100% (1/1) 100% (6/6) 100% (10/10)


 package it.polimi.ingsw.gc14.Model.Cards;
 
 import it.polimi.ingsw.gc14.Model.PlayableCard;
 import java.io.Serializable;
 
 
 /**
  * Abstract base class for all tribe cards.
  * A TribeCard is a {@link PlayableCard} that may either be an event card
  * or a non-event card, and may optionally specify a minimum number of players.
  */
 public abstract class TribeCard extends PlayableCard implements Serializable {
 
     /**
      * Indicates whether this tribe card is an event card.
      */
     private final boolean isEventCard;
 
     /**
      * Returns whether this tribe card is an event card.
      *
      * @return {@code true} if this card is an event card, {@code false} otherwise.
      */
     public boolean isEventCard() {
         return isEventCard;
     }
 
     /**
      * The minimum number of players required for this tribe card.
      */
     private final int nMin;
 
     /**
      * Returns the minimum number of players required for this tribe card.
      *
      * @return the minimum number of players required for this tribe card.
      */
     public int getNMin() {
         return nMin;
     }
 
     /**
      * Creates a tribe card with the specified era and event-card flag.
      * The minimum number of players is set to 0.
      *
      * @param Era the era of the tribe card.
      * @param isEventCard whether the card is an event card.
      */
     public TribeCard(int Era,boolean isEventCard) {
         this(Era,isEventCard,0);
     }
 
     /**
      * Creates a tribe card with the specified image id, era and event-card flag.
      * The minimum number of players is set to 0.
      *
      * @param idIMG the image identifier of the tribe card.
      * @param Era the era of the tribe card.
      * @param isEventCard whether the card is an event card.
      */
     public TribeCard(String idIMG,int Era,boolean isEventCard) {
         this(idIMG,Era,isEventCard,0);
     }
 
     /**
      * Creates a tribe card with the specified era, event-card flag,
      * and minimum number of players.
      *
      * @param Era the era of the tribe card.
      * @param isEventCard whether the card is an event card.
      * @param nMin the minimum number of players required for the card.
      */
     public TribeCard(int Era,boolean isEventCard,int nMin) {
         super(Era);
         this.nMin=nMin;
         this.isEventCard=isEventCard;
     }
 
     /**
      * Creates a tribe card with the specified image id, era, event-card flag,
      * and minimum number of players.
      *
      * @param idIMG the image identifier of the tribe card.
      * @param Era the era of the tribe card.
      * @param isEventCard whether the card is an event card.
      * @param nMin the minimum number of players required for the card.
      */
     public TribeCard(String idIMG, int Era,boolean isEventCard,int nMin) {
         super(idIMG,Era);
         this.nMin=nMin;
         this.isEventCard=isEventCard;
     }
 
     /**
      * Creates and returns a copy of this tribe card.
      *
      * @return a clone of this tribe card.
      */
     @Override
     public abstract TribeCard clone();
 }