FIx: Fixed Coverage Screenshots And htmlRepot.

This commit is contained in:
GabrieleRadice
2026-06-19 22:57:43 +02:00
parent a4dc8b2540
commit 0129efe400
316 changed files with 4566 additions and 4497 deletions
@@ -0,0 +1,192 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Artist</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: Artist (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">Artist</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
87.5%
</span>
<span class="absValue">
(7/8)
</span>
</td>
<td class="coverageStat">
<span class="percent">
88.9%
</span>
<span class="absValue">
(8/9)
</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 an Artist character card.
&nbsp; *
&nbsp; * &lt;p&gt;An Artist is a specific type of {@link Character} initialized with
&nbsp; * {@link CharacterType#ARTIST}.
&nbsp; */
&nbsp;public class Artist extends Character {
&nbsp;
&nbsp; /**
&nbsp; * Creates an Artist character card with the specified era.
&nbsp; *
&nbsp; * @param Era the era of the Artist card.
&nbsp; */
&nbsp; public Artist(int Era) {
<b class="fc">&nbsp; super(Era, CharacterType.ARTIST);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an Artist character card with the specified Era and minimum number of players required to play it.
&nbsp; *
&nbsp; * @param Era the era of the Artist card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Artist(int Era,int nMin) {
<b class="fc">&nbsp; super(Era, CharacterType.ARTIST,nMin);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an Artist character card with the specified image id and era.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Artist card.
&nbsp; * @param Era the era of the Artist card.
&nbsp; */
&nbsp; public Artist(String idIMG,int Era) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.ARTIST);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an Artist character card with the specified image id, era and
&nbsp; * minimum number of players required to play it.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Artist card.
&nbsp; * @param Era the era of the Artist card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Artist(String idIMG,int Era,int nMin) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.ARTIST,nMin);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Artist card.
&nbsp; *
&nbsp; * @return a clone of this Artist card.
&nbsp; */
&nbsp; @Override
&nbsp; public Character clone() {
<b class="fc">&nbsp; return new Artist(getIdIMG(),getEra(), getNMin());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Inserts this Artist card into the specified player&#39;s Artist 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.getArtists().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;
&nbsp; @Override
&nbsp; public String toStringPlayer() {
<b class="fc">&nbsp; return &quot;\uD83C\uDFA8&quot;;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringBoard() {
<b class="nc">&nbsp; return &quot;ARTIST&quot;;</b>
&nbsp; }
&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-19 22:53</div>
</div>
</body>
</html>
@@ -0,0 +1,283 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Builder</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: Builder (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
">
Branch, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">Builder</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(1/1)
</span>
</td>
<td class="coverageStat">
<span class="percent">
90%
</span>
<span class="absValue">
(9/10)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(16/16)
</span>
</td>
<td class="coverageStat">
<span class="percent">
97.1%
</span>
<span class="absValue">
(34/35)
</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 Builder character card.
&nbsp; *
&nbsp; * &lt;p&gt;A Builder is a specific type of {@link Character} that provides
&nbsp; * a reduction value when buying building cards.
&nbsp; */
&nbsp;public class Builder extends Character {
&nbsp;
&nbsp; /**
&nbsp; * The reduction value provided by this Builder card.
&nbsp; */
&nbsp; private final int reductionValue;
&nbsp;
&nbsp; /**
&nbsp; * The prestige value provided by this Builder card.
&nbsp; */
&nbsp; private final int prestigeValue;
&nbsp;
&nbsp; /**
&nbsp; * Returns the reduction value of this Builder card.
&nbsp; *
&nbsp; * @return the reduction value of this Builder card.
&nbsp; */
&nbsp; public int getReductionValue() {
<b class="fc">&nbsp; return reductionValue;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Returns the prestige value of this Builder card.
&nbsp; *
&nbsp; * @return the prestige value of this Builder card.
&nbsp; */
&nbsp; public int getPrestigeValue() {
<b class="fc">&nbsp; return prestigeValue;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Builder character card with the specified era, reduction value,
&nbsp; * and prestige value.
&nbsp; *
&nbsp; * @param Era the era of the Builder card.
&nbsp; * @param reductionValue the reduction value of the Builder card.
&nbsp; * @param prestigeValue the prestige value of the Builder card.
&nbsp; * @throws IllegalArgumentException if {@code reductionValue &lt; 0} or {@code prestigeValue &lt; 0}.
&nbsp; */
&nbsp; public Builder(int Era, int reductionValue, int prestigeValue) throws IllegalArgumentException {
<b class="fc">&nbsp; super(Era,CharacterType.BUILDER);</b>
<b class="fc">&nbsp; if(reductionValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.reductionValue = reductionValue;</b>
&nbsp;
<b class="fc">&nbsp; if(prestigeValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.prestigeValue = prestigeValue;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Builder character card with the specified era, reduction value,
&nbsp; * prestige value, and minimum number of players.
&nbsp; *
&nbsp; * @param Era the era of the Builder card.
&nbsp; * @param reductionValue the reduction value of the Builder card.
&nbsp; * @param prestigeValue the prestige value of the Builder card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; * @throws IllegalArgumentException if {@code reductionValue &lt; 0} or {@code prestigeValue &lt; 0}.
&nbsp; */
&nbsp; public Builder(int Era, int reductionValue, int prestigeValue,int nMin) throws IllegalArgumentException {
<b class="fc">&nbsp; super(Era,CharacterType.BUILDER,nMin);</b>
<b class="fc">&nbsp; if(reductionValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.reductionValue = reductionValue;</b>
&nbsp;
<b class="fc">&nbsp; if(prestigeValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.prestigeValue = prestigeValue;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Builder character card with the specified era, reduction value,
&nbsp; * and prestige value.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Builder card.
&nbsp; * @param Era the era of the Builder card.
&nbsp; * @param reductionValue the reduction value of the Builder card.
&nbsp; * @param prestigeValue the prestige value of the Builder card.
&nbsp; * @throws IllegalArgumentException if {@code reductionValue &lt; 0} or {@code prestigeValue &lt; 0}.
&nbsp; */
&nbsp; public Builder(String idIMG,int Era, int reductionValue, int prestigeValue) throws IllegalArgumentException {
<b class="fc">&nbsp; super(idIMG,Era,CharacterType.BUILDER);</b>
<b class="fc">&nbsp; if(reductionValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.reductionValue = reductionValue;</b>
&nbsp;
<b class="fc">&nbsp; if(prestigeValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.prestigeValue = prestigeValue;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Builder character card with the specified era, reduction value,
&nbsp; * prestige value, and minimum number of players.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Builder card.
&nbsp; * @param Era the era of the Builder card.
&nbsp; * @param reductionValue the reduction value of the Builder card.
&nbsp; * @param prestigeValue the prestige value of the Builder card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; * @throws IllegalArgumentException if {@code reductionValue &lt; 0} or {@code prestigeValue &lt; 0}.
&nbsp; */
&nbsp; public Builder(String idIMG,int Era, int reductionValue, int prestigeValue,int nMin) throws IllegalArgumentException {
<b class="fc">&nbsp; super(idIMG,Era,CharacterType.BUILDER,nMin);</b>
<b class="fc">&nbsp; if(reductionValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.reductionValue = reductionValue;</b>
&nbsp;
<b class="fc">&nbsp; if(prestigeValue &lt; 0) {</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
&nbsp; }
<b class="fc">&nbsp; this.prestigeValue = prestigeValue;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringPlayer() {
<b class="nc">&nbsp; return &quot;\uD83D\uDD28:&quot; + reductionValue + &quot; \uD83C\uDFC5:&quot; + prestigeValue;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringBoard() {
<b class="fc">&nbsp; return &quot;BUILDER \uD83D\uDD28:&quot; + reductionValue + &quot; \uD83C\uDFC5:&quot; + prestigeValue;</b>
&nbsp; }
&nbsp;
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Builder card.
&nbsp; *
&nbsp; * @return a clone of this Builder card.
&nbsp; */
&nbsp; @Override
&nbsp; public Character clone() {
<b class="fc">&nbsp; return new Builder(getIdIMG(),getEra(),getReductionValue(), getPrestigeValue(), getNMin());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Inserts this Builder card into the specified player&#39;s Builder 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.getBuilders().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-19 22:53</div>
</div>
</body>
</html>
@@ -0,0 +1,191 @@
<!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">
87.5%
</span>
<span class="absValue">
(7/8)
</span>
</td>
<td class="coverageStat">
<span class="percent">
88.9%
</span>
<span class="absValue">
(8/9)
</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;
&nbsp; @Override
&nbsp; public String toStringPlayer() {
<b class="fc">&nbsp; return &quot;\uD83C\uDF56&quot;;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringBoard() {
<b class="nc">&nbsp; return &quot;GATHERER&quot;;</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-19 22:53</div>
</div>
</body>
</html>
@@ -0,0 +1,235 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Hunter</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: Hunter (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
">
Branch, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">Hunter</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">
(9/9)
</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">
(16/16)
</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 Hunter character card.
&nbsp; *
&nbsp; * &lt;p&gt;A Hunter is a specific type of {@link Character} initialized with
&nbsp; * {@link CharacterType#HUNTER}.
&nbsp; */
&nbsp;public class Hunter extends Character {
&nbsp;
&nbsp; /**
&nbsp; * Describes whether the {@code Hunter Icon} is present or not. Whenever an
&nbsp; * {@code Hunter} with an {@code Hunter Icon} is added to the tribe, 1 {@code Food token} is awarded for each Hunter in the tribe
&nbsp; * (with or without an icon).
&nbsp; */
&nbsp; private final boolean icon;
&nbsp;
&nbsp; /**
&nbsp; * Returns whether this Hunter card has the icon.
&nbsp; *
&nbsp; * @return {@code true} if this Hunter card has the icon, {@code false} otherwise.
&nbsp; */
&nbsp; public boolean getIcon() {
<b class="fc">&nbsp; return icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Hunter character card with the specified era and icon value.
&nbsp; *
&nbsp; * @param Era the era of the Hunter card.
&nbsp; * @param icon the icon value of the Hunter card.
&nbsp; */
&nbsp; public Hunter(int Era, boolean icon) {
<b class="fc">&nbsp; super(Era, CharacterType.HUNTER);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Hunter character card with the specified era, icon value,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param Era the era of the Hunter card.
&nbsp; * @param icon the icon value of the Hunter card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Hunter(int Era, boolean icon, int nMin) {
<b class="fc">&nbsp; super(Era, CharacterType.HUNTER,nMin);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Hunter character card with the specified image id, era and icon value.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Hunter card.
&nbsp; * @param Era the era of the Hunter card.
&nbsp; * @param icon the icon value of the Hunter card.
&nbsp; */
&nbsp; public Hunter(String idIMG,int Era, boolean icon) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.HUNTER);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Hunter character card with the specified image id, era, icon value,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Hunter card.
&nbsp; * @param Era the era of the Hunter card.
&nbsp; * @param icon the icon value of the Hunter card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Hunter(String idIMG,int Era, boolean icon, int nMin) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.HUNTER,nMin);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringPlayer() {
<b class="fc">&nbsp; return this.icon ? &quot;\uD83C\uDF56&quot; : &quot;&quot;;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringBoard() {
<b class="fc">&nbsp; return &quot;HUNTER&quot; + (this.icon ? &quot; \uD83C\uDF56&quot; : &quot;&quot;);</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Hunter card.
&nbsp; *
&nbsp; * @return a clone of this Hunter card.
&nbsp; */
&nbsp; @Override
&nbsp; public Character clone() {
<b class="fc">&nbsp; return new Hunter(getIdIMG(),getEra(), getIcon(), getNMin());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Inserts this Hunter card into the specified player&#39;s Hunter collection.
&nbsp; *
&nbsp; * &lt;p&gt;If this card has the Hunter icon, the player gains 1 food for each
&nbsp; * Hunter currently in their tribe. The method also applies any building
&nbsp; * 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.getHunters().add(this);</b>
<b class="fc">&nbsp; if(this.getIcon()){</b>
<b class="fc">&nbsp; player.addFood(player.getHunters().size());</b>
&nbsp; }
<b class="fc">&nbsp; player.getBuildingCards().stream().filter(x-&gt;x.getEffectId()==0).forEach(x-&gt;x.applyEffect(player));</b>
&nbsp; }
&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-19 22:53</div>
</div>
</body>
</html>
@@ -0,0 +1,239 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Inventor</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: Inventor (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
">
Branch, %
</th>
<th class="coverageStat
">
Line, %
</th>
</tr>
<tr>
<td class="name">Inventor</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">
(9/9)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(18/18)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(23/23)
</span>
</td>
</tr>
</table>
<br/>
<br/>
<pre>
<code class="sourceCode" id="sourceCode">&nbsp;package it.polimi.ingsw.gc14.Model.Cards.TribeCards.Characters;
&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 an Inventor character card.
&nbsp; *
&nbsp; * &lt;p&gt;An Inventor is a specific type of {@link Character} initialized with
&nbsp; * {@link CharacterType#INVENTOR}.
&nbsp; */
&nbsp;public class Inventor extends Character {
&nbsp; /**
&nbsp; * The {@code Icons}&#39;s ID. There are a total of 10 different Icons.
&nbsp; */
&nbsp; private final int icon;
&nbsp;
&nbsp; /**
&nbsp; * Returns the icon value of this Inventor card.
&nbsp; *
&nbsp; * @return the icon value of this Inventor card.
&nbsp; */
&nbsp; public int getIcon() {
<b class="fc">&nbsp; return icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an Inventor character card with the specified era and icon value.
&nbsp; *
&nbsp; * @param Era the era of the Inventor card.
&nbsp; * @param icon the icon value of the Inventor card.
&nbsp; * @throws IllegalArgumentException if {@code icon &lt; 0} or {@code icon &gt; 9}.
&nbsp; */
&nbsp; public Inventor(int Era,int icon) throws IllegalArgumentException {
<b class="fc">&nbsp; super(Era, CharacterType.INVENTOR);</b>
<b class="fc">&nbsp; if(icon&lt;0 || icon&gt;9)</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an Inventor character card with the specified era, icon value,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param Era the era of the Inventor card.
&nbsp; * @param icon the icon value of the Inventor card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; * @throws IllegalArgumentException if {@code icon &lt; 0} or {@code icon &gt; 9}.
&nbsp; */
&nbsp; public Inventor(int Era,int icon,int nMin) throws IllegalArgumentException {
<b class="fc">&nbsp; super(Era, CharacterType.INVENTOR,nMin);</b>
<b class="fc">&nbsp; if(icon&lt;0 || icon&gt;9)</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an Inventor character card with the specified image id, era and icon value.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Inventor card.
&nbsp; * @param Era the era of the Inventor card.
&nbsp; * @param icon the icon value of the Inventor card.
&nbsp; * @throws IllegalArgumentException if {@code icon &lt; 0} or {@code icon &gt; 9}.
&nbsp; */
&nbsp; public Inventor(String idIMG,int Era,int icon) throws IllegalArgumentException {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.INVENTOR);</b>
<b class="fc">&nbsp; if(icon&lt;0 || icon&gt;9)</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates an Inventor character card with the specified image id, era, icon value,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Inventor card.
&nbsp; * @param Era the era of the Inventor card.
&nbsp; * @param icon the icon value of the Inventor card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; * @throws IllegalArgumentException if {@code icon &lt; 0} or {@code icon &gt; 9}.
&nbsp; */
&nbsp; public Inventor(String idIMG,int Era,int icon,int nMin) throws IllegalArgumentException {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.INVENTOR,nMin);</b>
<b class="fc">&nbsp; if(icon&lt;0 || icon&gt;9)</b>
<b class="fc">&nbsp; throw new IllegalArgumentException();</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringPlayer() {
<b class="fc">&nbsp; return &quot;ID:&quot; + icon;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringBoard() {
<b class="fc">&nbsp; return &quot;INVENTOR ID:&quot; + icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Inventor card.
&nbsp; *
&nbsp; * @return a clone of this Inventor card.
&nbsp; */
&nbsp; @Override
&nbsp; public Character clone() {
<b class="fc">&nbsp; return new Inventor(getIdIMG(),getEra(),icon, getNMin());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Inserts this Inventor card into the specified player&#39;s Inventor collection.
&nbsp; *
&nbsp; * &lt;p&gt;The method also applies the building effects related to inventor pairs
&nbsp; * and 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.getInventors().add(this);</b>
<b class="fc">&nbsp; player.getBuildingCards().stream().filter(b -&gt; b.getEffectId() == 4).forEach(b4 -&gt; b4.applyEffect(player));</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-19 22:53</div>
</div>
</body>
</html>
@@ -0,0 +1,218 @@
<!DOCTYPE html>
<html id="htmlId">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Coverage Report > Shaman</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: Shaman (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">Shaman</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">
(9/9)
</span>
</td>
<td class="coverageStat">
<span class="percent">
100%
</span>
<span class="absValue">
(14/14)
</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 Shaman character card.
&nbsp; *
&nbsp; * &lt;p&gt;A Shaman is a specific type of {@link Character} initialized with
&nbsp; * {@link CharacterType#SHAMAN}.
&nbsp; */
&nbsp;public class Shaman extends Character {
&nbsp; /**
&nbsp; * The number of star {@code Icons} the card possesses.
&nbsp; * During the {@link it.polimi.ingsw.gc14.Model.Cards.TribeCards.Events.ShamanicRitual Shamanic Ritual Event}, having the
&nbsp; * majority of these icons provides Prestige Points;
&nbsp; * having the minority, on the other hand, results in
&nbsp; * losing Prestige Points.
&nbsp; */
&nbsp; private final int icon;
&nbsp;
&nbsp; /**
&nbsp; * Returns the icon value of this Shaman card.
&nbsp; *
&nbsp; * @return the icon value of this Shaman card.
&nbsp; */
&nbsp; public int getIcon() {
<b class="fc">&nbsp; return icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Shaman character card with the specified era and icon value.
&nbsp; *
&nbsp; * @param Era the era of the Shaman card.
&nbsp; * @param icon the icon value of the Shaman card.
&nbsp; */
&nbsp; public Shaman(int Era, int icon) {
<b class="fc">&nbsp; super(Era, CharacterType.SHAMAN);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Shaman character card with the specified era, icon value,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param Era the era of the Shaman card.
&nbsp; * @param icon the icon value of the Shaman card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Shaman(int Era, int icon, int nMin) {
<b class="fc">&nbsp; super(Era, CharacterType.SHAMAN,nMin);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Shaman character card with the specified image id, era and icon value.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Shaman card.
&nbsp; * @param Era the era of the Shaman card.
&nbsp; * @param icon the icon value of the Shaman card.
&nbsp; */
&nbsp; public Shaman(String idIMG,int Era, int icon) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.SHAMAN);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates a Shaman character card with the specified image id, era, icon value,
&nbsp; * and minimum number of players.
&nbsp; *
&nbsp; * @param idIMG the image identifier of the Shaman card.
&nbsp; * @param Era the era of the Shaman card.
&nbsp; * @param icon the icon value of the Shaman card.
&nbsp; * @param nMin the minimum number of players required for the card.
&nbsp; */
&nbsp; public Shaman(String idIMG,int Era, int icon, int nMin) {
<b class="fc">&nbsp; super(idIMG,Era, CharacterType.SHAMAN,nMin);</b>
<b class="fc">&nbsp; this.icon = icon;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringPlayer() {
<b class="fc">&nbsp; return &quot;\uD83C\uDF1F:&quot; + icon;</b>
&nbsp; }
&nbsp;
&nbsp; @Override
&nbsp; public String toStringBoard() {
<b class="fc">&nbsp; return &quot;SHAMAN \uD83C\uDF1F:&quot; + icon;</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Creates and returns a copy of this Shaman card.
&nbsp; *
&nbsp; * @return a clone of this Shaman card.
&nbsp; */
&nbsp; @Override
&nbsp; public Character clone() {
<b class="fc">&nbsp; return new Shaman(getIdIMG(),getEra(), getIcon(), getNMin());</b>
&nbsp; }
&nbsp;
&nbsp; /**
&nbsp; * Inserts this Shaman card into the specified player&#39;s Shaman 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)
&nbsp; {
<b class="fc">&nbsp; player.getShamans().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-19 22:53</div>
</div>
</body>
</html>