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

182 lines
4.9 KiB
HTML

<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Gatherer</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.TribeCards.Characters</a>
</div>
<h1>Coverage Summary for Class: Gatherer (it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters)</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">Gatherer</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">
(7/7)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters;
&nbsp;
&nbsp;import it.polimi.ingsw.gc14.Model.Cards.TribeCards.Character;
&nbsp;import it.polimi.ingsw.gc14.Model.Cards.TribeCards.CharacterType;
&nbsp;import it.polimi.ingsw.gc14.Model.Player;
&nbsp;
&nbsp;/**
&nbsp; * Represents a Gatherer character card.
&nbsp; *
&nbsp; * &lt;p&gt;A Gatherer is a specific type of {@link Character} initialized with
&nbsp; * {@link CharacterType#GATHERER}.
&nbsp; */
&nbsp;public class Gatherer extends Character {
&nbsp;
&nbsp; /**
&nbsp; * Creates a Gatherer character card with the specified era.
&nbsp; *
&nbsp; * @param Era the era of the Gatherer card.
&nbsp; */
&nbsp; public Gatherer(int Era) {
<b class="fc">&nbsp; super(Era, CharacterType.GATHERER);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Gatherer character card with the specified era and minimum number of players.
&nbsp; *
&nbsp; * @param Era the era of the Gatherer card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Gatherer(int Era, int nMin) {
<b class="fc">&nbsp; super(Era, CharacterType.GATHERER,nMin);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Gatherer character card with the specified image id and era.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Gatherer card.
&nbsp; * @param Era the era of the Gatherer card.
&nbsp; */
&nbsp; public Gatherer(String idIMG,int Era) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.GATHERER);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Gatherer character card with the specified image id, era and
&nbsp; * minimum number of players.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Gatherer card.
&nbsp; * @param Era the era of the Gatherer card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Gatherer(String idIMG,int Era, int nMin) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.GATHERER,nMin);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Gatherer card.
&nbsp; *
&nbsp; * @return a clone of this Gatherer card.
&nbsp; */
&nbsp; @Override
&nbsp; public Character clone() {
<b class="fc">&nbsp; return new Gatherer(getIdIMG(),getEra(), getNMin());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Inserts this Gatherer card into the specified player&#39;s Gatherer collection
&nbsp; * and applies any building effects triggered by character set completion.
&nbsp; *
&nbsp; * @param player the player who receives the card.
&nbsp; */
&nbsp; @Override
&nbsp; public void insert(Player player) {
<b class="fc">&nbsp; player.getGatherers().add(this);</b>
<b class="fc">&nbsp; player.getBuildingCards().stream().filter(x-&gt;x.getEffectId()==0).forEach(x-&gt;x.applyEffect(player));</b>
&nbsp; }
&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>