Files
Progetto-ingegneria-del-sof…/deliverables/Coverage/htmlReport/ns-4/sources/source-2.html
T
2026-06-19 21:50:38 +02:00

207 lines
5.7 KiB
HTML

<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > TribeCard</title>
<style type="text/css">
@import "../../css/coverage.css";
@import "../../css/idea.min.css";
</style>
<script type="text/javascript" src="../../js/highlight.min.js"></script>
<script type="text/javascript" src="../../js/highlightjs-line-numbers.min.js"></script>
</head>
<body>
<div class="content">
<div class="breadCrumbs">
Current scope: <a href="../../index.html">all classes</a>
<span class="separator">|</span>
<a href="../index.html">it.polimi.ingsw.gc14.Model.Cards</a>
</div>
<h1>Coverage Summary for Class: TribeCard (it.polimi.ingsw.gc14.Model.Cards)</h1>
<table class="coverageStats">
<tr>
<th class="name">Class</th>
<th class="coverageStat
">
Class, %
</th>
<th class="coverageStat
">
Method, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">TribeCard</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(6/6)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(11/11)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package it.polimi.ingsw.gc14.Model.Cards;
&nbsp;
&nbsp;import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
&nbsp;import it.polimi.ingsw.gc14.Model.PlayableCard;
&nbsp;import java.io.Serializable;
&nbsp;
&nbsp;
&nbsp;/**
&nbsp; * Abstract base class for all tribe cards.
&nbsp; * A TribeCard is a {@link PlayableCard} that may either be an event card
&nbsp; * or a non-event card, and may optionally specify a minimum number of players.
&nbsp; */
&nbsp;public abstract class TribeCard extends PlayableCard implements Serializable {
&nbsp;
&nbsp; /**
&nbsp; * Indicates whether this tribe card is an event card.
&nbsp; */
&nbsp; private boolean isEventCard;
&nbsp;
&nbsp; /**
&nbsp; * Returns whether this tribe card is an event card.
&nbsp; *
&nbsp; * @return {@code true} if this card is an event card, {@code false} otherwise.
&nbsp; */
&nbsp; public boolean isEventCard() {
<b class="fc">&nbsp; return isEventCard;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * The minimum number of players required for this tribe card.
&nbsp; */
<b class="fc">&nbsp; private int nMin=0;</b>
&nbsp;
&nbsp; /**
&nbsp; * Returns the minimum number of players required for this tribe card.
&nbsp; *
&nbsp; * @return the minimum number of players required for this tribe card.
&nbsp; */
&nbsp; public int getNMin() {
<b class="fc">&nbsp; return nMin;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a tribe card with the specified era and event-card flag.
&nbsp; * The minimum number of players is set to 0.
&nbsp; *
&nbsp; * @param Era the era of the tribe card.
&nbsp; * @param isEventCard whether the card is an event card.
&nbsp; */
&nbsp; public TribeCard(int Era,boolean isEventCard) {
<b class="fc">&nbsp; this(Era,isEventCard,0);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a tribe card with the specified image id, era and event-card flag.
&nbsp; * The minimum number of players is set to 0.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the tribe card.
&nbsp; * @param Era the era of the tribe card.
&nbsp; * @param isEventCard whether the card is an event card.
&nbsp; */
&nbsp; public TribeCard(String idIMG,int Era,boolean isEventCard) {
<b class="fc">&nbsp; this(idIMG,Era,isEventCard,0);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a tribe card with the specified era, event-card flag,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param Era the era of the tribe card.
&nbsp; * @param isEventCard whether the card is an event card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public TribeCard(int Era,boolean isEventCard,int nMin) {
<b class="fc">&nbsp; super(Era);</b>
<b class="fc">&nbsp; this.nMin=nMin;</b>
<b class="fc">&nbsp; this.isEventCard=isEventCard;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a tribe card with the specified image id, era, event-card flag,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the tribe card.
&nbsp; * @param Era the era of the tribe card.
&nbsp; * @param isEventCard whether the card is an event card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public TribeCard(String idIMG, int Era,boolean isEventCard,int nMin) {
<b class="fc">&nbsp; super(idIMG,Era);</b>
<b class="fc">&nbsp; this.nMin=nMin;</b>
<b class="fc">&nbsp; this.isEventCard=isEventCard;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this tribe card.
&nbsp; *
&nbsp; * @return a clone of this tribe card.
&nbsp; */
&nbsp; @Override
&nbsp; public abstract TribeCard clone();
&nbsp;}
</code>
</pre>
</div>
<script type="text/javascript">
(function() {
var msie = false, msie9 = false;
/*@cc_on
msie = true;
@if (@_jscript_version >= 9)
msie9 = true;
@end
@*/
if (!msie || msie && msie9) {
hljs.highlightAll()
hljs.initLineNumbersOnLoad();
}
})();
</script>
<div class="footer">
<div style="float:right;">generated on 2026-06-14 21:53</div>
</div>
</body>
</html>